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 12:46 PM Tejun Heo <tj@kernel.org> wrote:
>
> No objection from workqueue side but the comment in swait.h doesn't look too
> encouraging. Kinda difficult to make a call from my side. Linus, does this
> qualify as the RT use case you had on mind?

I still find swait to be very questionable, but at least it has gotten
better over time.

Almost all users of swait have historically been buggy and/or
pointless. At least the naming disaster has been fixed, and the
outright bugs have hopefully been handled in the process. The
"pointless" part has been that people have used these swait lists for
single-entry queues, for absolutely no reason when just a task pointer
would have been the better model.

Honestly, that seems to be the case even for the workqueue code. Why
the h*ll do people insist on using wait queues - and then converting
them to swait queues - when there is only a single waiter (the pool
manager in this case).

I really don't understand this fundamental disconnect with reality.
You have a waitqueue with locking issues, and a _single_ waiter, and
what you do is convert this to swait.

WHY?

And no, the answer is not "swait is just so great". swait has
traditionally been a buggy misnamed disaster, and the fact that at
least now it's no longer using actively misleading naming any more
doesn't make it magically better than just "wake_up_process()".

Linus

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