On Sat, 2015-07-25 at 15:31 -0700, Davidlohr Bueso wrote: > On Wed, 2015-07-22 at 16:12 -0400, Waiman Long wrote: > > The smp_store_release() is not a full barrier. In order to avoid missed > > wakeup, we may need to add memory barrier around locked and cpu state > > variables adding to complexity. As the chance of spurious wakeup is very > > low, it is easier and safer to just do an unconditional kick at unlock > > time. > > Although I guess if SPIN_THRESHOLD is ever enlarged, the chances of > spurious wakeups would be greater. > > > Signed-off-by: Waiman Long <[email protected]> > > Reviewed-by: Davidlohr Bueso <[email protected]>
Thinking about this some more, as good practice, could you please add a comment in the code explicitly mentioning the spurious wakeup side effect? Perhaps even having something more generic for the entire kernel might be added/created to Documentation/spurious-wakeups.txt? Thanks, Davidlohr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

