Thread (30 messages) 30 messages, 9 authors, 2017-07-12

Re: [PATCH 2/4] swait: add the missing killable swaits

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2017-06-29 18:59:29
Also in: linux-api, linux-fsdevel, lkml

On Thu, Jun 29, 2017 at 11:33 AM, Davidlohr Bueso [off-list ref] wrote:
On Thu, 29 Jun 2017, Linus Torvalds wrote:
quoted
I actually think swait is pure garbage. Most users only wake up one
process anyway, and using swait for that is stupid. If you only wake
up one, you might as well just have a single process pointer, not a
wait list at all, and then use "wake_up_process()".
But you still need the notion of a queue, even if you wake one task
at a time... I'm probably missing your point here.
The *reason* they wake up only one seems to be that there really is
just one. It's some per-cpu idle thread for kvm, and for RCU it's the
RCU workqueue thread.

So the queue literally looks suspiciously pointless.

But I might be wrong, and there can actually be multiple entries. If
there are, I don't see why the wake-up-one semantics the code uses
would be valid, though.

                   Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help