[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314871201.7945.17.camel@twins>
Date: Thu, 01 Sep 2011 12:00:01 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Huang Ying <ying.huang@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -mm 1/2] irq_work, Use llist in irq_work
On Thu, 2011-09-01 at 16:44 +0800, Huang Ying wrote:
> Because llist is in library, it may be used in highly contended case and
> light/un-contended loads. So maybe code as above is best choice for llist.
Well the thing is, if you're heavily contended you should probably be
doing something else..
> > Also, just noticed, why do you have different list_head/list_node
> > structures? They're the same, a single pointer.
>
> There is only one structure before (llist_head). Linus give me some
> comments about that, suggests to use 2 structures. I think his comments
> are reasonable. Copied here:
OK
> Even with this_cpu_* ops, it seems that the race condition I described
> is still possible.
>
> - use this_cpu_cmpxchg to queue irq_work into irq_work_list of CPU A
> - preempted and resumed execution on CPU B
> - arch_irq_work_raise on CPU B
>
> Do you think so?
No you're right, got my brain inside-out today or so..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists