[ofa-general] Re: [PATCHv2] IB/mad: fix duplicated kernel thread name

Or Gerlitz ogerlitz at voltaire.com
Wed Jul 18 01:50:27 PDT 2007


Sean Hefty wrote:
>> Can you explain why would not the IB CM use the thread context 
>> provided by the mad layer?

> You can end up with deadlock conditions when destroying cm_id's that 
> have outstanding MADs.  It also increases MAD processing time, which can 
> increase dropping MADs.

OK, thanks for the clarification.

  >> Second, if the CM needs a different context why not use the system
>> threads? I understood from Michael's reply that the CM code relies on 
>> some thread/queue flushing at the time of CM ID destruction, is it an 
>> implementation issue that can change? if not, can't one dedicated 
>> thread do the job?

> The timing and use of the system threads is unknown.  When the ib_mad 
> module was created, it was suggested that the system threads not be 
> used.  (I think it was Roland who recommended this.)  We can change to 
> system threads, but it does open the possibility of complicated deadlock 
> conditions if other modules use the system threads as well.

I know that from reasons such as timing and use which you mention, 
people tend to not to use the system threads for their fast path tasks. 
As for the possibility of deadlock b/c of system threads usage, this is 
an argument which I like less (...), eg the network stack does well on 
its deadlocak avoidance code without spawning dedicated threads.

Is it all about that the net stack uses softirqs where the ib stack 
needs threads for its control path (as of the usage of commands for IB 
resource create/modify/destroy). If this is the case, do you think it 
justifies spawning thread per CPU?

Or.





More information about the general mailing list