Skip to content

Make wake_up_{bit,var} less fragile

NeilBrown lkml 4 versions – Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/27 patches 2 repliesApplied
  2. v3 posting 1/28 patches 0 repliesSuperseded
  3. v2 RFC7 patches 8 repliesApplied
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC9 patches16 repliesSuperseded

Patches in v3 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/7sched: change wake_up_bit() and related function to expect unsigned long *include/linux/wait_bit.h kernel/sched/wait_bit.c+14 -140 replies
2/7sched: Improve documentation for wake_up_bit/wait_on_bit family of functionsinclude/linux/wait_bit.h kernel/sched/wait_bit.c+107 -860 replies
3/7sched: Document wait_var_event() family of functions and wake_up_var()include/linux/wait_bit.h kernel/sched/wait_bit.c+101 -00 replies
4/7sched: Add test_and_clear_wake_up_bit() and atomic_dec_and_wake_up()include/linux/wait_bit.h+60 -00 replies
5/7sched: Add wait/wake interface for variable updated under a lock.include/linux/wait_bit.h+106 -00 replies
6/7sched: add wait_var_event_io()include/linux/wait_bit.h+31 -00 replies
7/7softirq: use bit waits instead of var waits.kernel/softirq.c+4 -100 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH 0/7 v3] Make wake_up_{bit,var} less fragile

Hi,

this is a revised set of patches for cleaning up wake_up_bit and wake_up_var and related. They are the result of more proof reading, and of trying to make use of the new interfaces anywhere in the kernel where these interfaces are used.

This should apply after -rc1, or at least after the block tree is merged.

Note that on current master these cause a build error in bcachefs as it hasn't been updated with the new i_state bit management.

Apart from proof-reading fixes this series enhances the previous series:

- adds wait_var_event_any_lock() which can be used with any lock for which there are foo_lock and foo_unlock functions. This is useful to deal with places that want to call filemap_invalidate_unlock/lock while waiting for a var

- removes might_sleep() for wait_var_event_spinlock() as the code won't sleep until after it take the lock

- adds wait_var_event_io() for io_schedule waits - xfs can use this.

- as a bonus, softirq gets some improvements to waiting. Feel free to drop or delay that one if not completely comfortable.

Thanks,
NeilBrown