[Click] NotifierQueue on multi-threaded Click problem.

Eddie Kohler kohler at cs.ucla.edu
Wed Aug 29 15:03:14 EDT 2007


Hi Jason/Joonwoo,

Thanks so much for this!

I'm going to go through your patch in several stages.  First is the 
_pending change.  I think you're right that there was a problem there, 
but I am trying to fix it in a different way in the attached patch, 
which is checked in.  Does it work for you?

Eddie


Jason Park (Joonwoo Park) wrote:
> Beyers,
> 
> Thank for your assist, but I want to use notifier-queue which doesn't spin
> always. (For the same reason, I'm not using PollDevice element)
> I'm afraid of NotifierQueue and friends were designed for single-threaded
> click only intentionally.
> 
> Jason Park (Joonwoo Park)
> 
> ________________________________________
> From: Beyers Cronje [mailto:bcronje at gmail.com] 
> Sent: Monday, July 09, 2007 5:54 PM
> To: Jason Park (Joonwoo Park)
> Cc: kohler at cs.ucla.edu; Click
> Subject: Re: [Click] NotifierQueue on multi-threaded Click problem.
> 
> Hi Jason,
> 
> You can also have a look at CPUQueue and MSQueue which should be MT safe.
> 
> Beyers
> On 7/9/07, Jason Park (Joonwoo Park) < jason at geninetworks.com> wrote:
> Hi.
> Recently I tried multi-threaded Click to get more performance. 
> But I got stopped queue in a few seconds.
> For the test, I connected two click installed machine with e1000 gigabit
> directly as sender and replier.
> The replier made problem on multi-threaded click that run_task() of 
> ToDevice() won't be called any more.
> 
> I worked patch for the problem and it contains.
> - FullNoteQueue, NotifierQueue
> The spinlock_bh needed because of push and pull can be called
> concurrently from softirq. 
>   But I didn't work for SimpleQueue, it might lock needed too.
> - Task
>   I think that the member _pending should be atomic, in more race
> conditional situation, it can be problem. (You can try SLEEPNIESS_TRIGGER=1)
> 
> - Etc.
>   Replace member function of SpinlockIRQ with the things from linux to
> disable preempt when irq disabled. (But I didn't set CONFIG_PREEMPT for
> this test)
>   Add class SpinlockBH.
>   Fix Master's lock. (Eddie, Am I right?) 
>   I'm running linux 2.6.19.2 SMP.
> 
> I'll be pleased if this patch works.
> 
> Jason Park (Joonwoo Park).
> 
> _______________________________________________
> click mailing list 
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending-fix.diff
Type: text/x-patch
Size: 5858 bytes
Desc: not available
Url : https://pdos.csail.mit.edu/pipermail/click/attachments/20070829/2d0ea084/pending-fix.bin


More information about the click mailing list