lkml.org 
[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] sched/wait: Make interruptible exclusive waitqueue wakeups reliable
On Mon, Dec 9, 2019 at 2:28 AM Ingo Molnar <mingo@kernel.org> wrote:
>
> Totally untested, but shows the principle: I believe interrupted
> exclusive waits should not auto-cleanup in prepare_to_wait_event().

Oleg convinced me I was wrong, and that there is no bug, so I don't
think we need anything after all.

Yes, there's a "race" between wakeup and returning the error, but
since any correct code already relies on the condition having become
true before the wakeup (and it needs to be a stable condition -
otherwise the exclusive waiters wouldn't work in the first place), the
code that returns the error will never get reached because of the

> if (condition)
> break;

part of the ___wait_event() macro.

Linus

\
 
 \ /
  Last update: 2019-12-09 19:08    [W:0.091 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site