Skip to content

sched/wait: fix and then kill abort_exclusive_wait()

Oleg Nesterov lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v12 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched/wait: abort_exclusive_wait() should pass TASK_NORMAL to wake_up()include/linux/wait.h kernel/sched/wait.c+6 -80 replies
2/4sched/wait: avoid abort_exclusive_wait() in ___wait_event()include/linux/wait.h kernel/sched/wait.c+19 -111 reply
3/4sched/wait: avoid abort_exclusive_wait() in __wait_on_bit_lock()include/linux/wait.h kernel/sched/wait.c+21 -440 replies
4/4sched/wait: introduce init_wait_entry()include/linux/wait.h kernel/sched/wait.c+12 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] sched/wait: fix and then kill abort_exclusive_wait()
Quoted 10 lines · Peter Zijlstra
Quoted 2 lines · Oleg Nesterov

And, if you agree with this change I will try to change __wait_event() as well and kill abort_exclusive_wait().

Yeah, I think this'll work. Please send a new series with 'enhanced' changelog so that when we have to look at this again in a few weeks/months time we won't be cursing at ourselves for how the heck it was supposed to work.

OK, thanks, please see V2.

I think it makes sense to change ___wait_event() first, this simplifies the documentation in __wait_on_bit_lock().

See also 4/4, it is new and simple. From the changelog

In particular we are ready to remove the signal_pending_state() checks from wait_bit_action_f helpers and change __wait_on_bit_lock() to use prepare_to_wait_event().

Yes. The necessary change is trivial. But this probably needs a separate discussion/testing because we need to re-investigate the problem which was somehow fixed by 68985633bccb60 "sched/wait: Fix signal handling in bit wait helpers".

Oleg.

 include/linux/wait.h |  17 ++-------
 kernel/sched/wait.c  | 101 ++++++++++++++++++++++++---------------------------
 2 files changed, 52 insertions(+), 66 deletions(-)