[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/3] ipc/sem.c: handle spurious wakeups
On 10/11/2011 11:54 PM, Andrew Morton wrote:
> On Sat, 24 Sep 2011 19:37:11 +0200
> Manfred Spraul<> wrote:
>> semtimedop() does not handle spurious wakeups, it returns -EINTR to user space.
>> Most other schedule() users would just loop and not return to user space.
>> The patch adds such a loop to semtimedop()
> What is a "spurious wakeup" and how can a process receive one?
A spurious wakeup means that someone calls wake_up_process() without a
proper reason.
The most common case would be a wake_up_process() that was somehow delayed.

Peter's patch made such delayed wakeups very common, this is how we
found the issue.

The "standard" kernel primitives handle such wakeups, ipc/sem.c doesn't
handle that.

> I'm wondering about the userspace-visible effects of this change, and
> any compatibility issues?
This change has no userspace visible effects.


 \ /
  Last update: 2011-10-13 20:47    [W:0.044 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site