lkml.org 
[lkml]   [2012]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [REPOST] RFC: sched: Prevent wakeup to enter critical section needlessly
> wait_event:
>
> prepare_to_wait(wq) // takes wq->lock
>
> if (!CONDITION)
> schedule();
>
> Now,
>
> CONDITION = 1;
> wake_up(wq);
>
> at least need the full mb() before lits_empty().

You're right, but it would probably only matter for inlining with LTO
(if the LTO compiler ever decides to do that)

Without that a call should be always enough barrier in practice.

So yes I would add the mb, but most likely it will not make much
difference. Just make sure to comment it.

-Andi


\
 
 \ /
  Last update: 2012-10-10 16:41    [W:0.082 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site