lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/3] workqueue: Make the workqueue code PREEMPT_RT safe
On Tue, May 26, 2020 at 2:41 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Almost all users of swait have historically been buggy and/or
> pointless.

Yeah, looking at this one, it really seems to fundamentally fall in
the "pointless" category.

So yeah - instead of extending swait with a new primitive that nobody
else wants than this pointless case, just don't use swait at all.

We have better models. We have "rcuwait", and we have
"wake_up_process()". Either of which is simpler and more efficient
than swait, and are actually useful. rcuwait isn't exactly widely
used, but it has very nice semantics for when that is what you want.
And wake_up_process() is both simple and straightforward, particularly
when you already have a spinlock for protecting whatever state it is
you're waking up on or waiting for.

Linus

\
 
 \ /
  Last update: 2020-05-26 23:48    [W:0.112 / U:2.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site