[openib-general] [RFC] [PATCH] mad: Change mad thread model to be 1 thread/port rather than 1 thread/port/CPU

Sean Hefty mshefty at ichips.intel.com
Fri Nov 19 13:25:27 PST 2004


Hal Rosenstock wrote:
> Change mad thread model to be 1 thread/port rather than 1 thread/port/CPU
> (Note that I have not applied this but am requesting comments).
> 
> Index: mad.c
> ===================================================================
> --- mad.c	(revision 1269)
> +++ mad.c	(working copy)
> @@ -1900,7 +1900,7 @@
>  		goto error7;
>  
>  	snprintf(name, sizeof name, "ib_mad%d", port_num);
> -	port_priv->wq = create_workqueue(name);
> +	port_priv->wq = create_singlethread_workqueue(name);
>  	if (!port_priv->wq) {
>  		ret = -ENOMEM;
>  		goto error8;

My guess is that this is probably preferable to having 1/port/CPU, 
especially on larger systems.  It would depend on what the clients do 
when notified of a completion.

I guess one advantage of keeping it 1/port/CPU (for now) is that it 
would help test multi-threaded support.

- Sean



More information about the general mailing list