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

Hal Rosenstock halr at voltaire.com
Mon Nov 29 09:02:49 PST 2004


On Fri, 2004-11-19 at 16:25, Sean Hefty wrote:
> 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 too think we should change this to a single threaded workqueue (and
will do so shortly).

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

One can always change it back for testing purposes but this means there
is not as much "automatic" testing by default.

-- Hal




More information about the general mailing list