Skip to content

sched/wait: Collapse __wait_event macros -v5

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16sched/wait: Make the signal_pending() checks consistentinclude/linux/tty.h include/linux/wait.h+22 -260 replies
2/16sched/wait: Change timeout logicinclude/linux/wait.h+11 -130 replies
3/16sched/wait: Change the wait_exclusive control flowinclude/linux/wait.h+5 -40 replies
4/16sched/wait: Introduce ___wait_event()include/linux/wait.h+36 -00 replies
5/16sched/wait: Collapse __wait_event()include/linux/wait.h+2 -110 replies
6/16sched/wait: Collapse __wait_event_timeout()include/linux/wait.h+3 -110 replies
7/16sched/wait: Collapse __wait_event_interruptible()include/linux/wait.h+2 -150 replies
8/16sched/wait: Collapse __wait_event_interruptible_timeout()include/linux/wait.h+3 -150 replies
9/16sched/wait: Collapse __wait_event_interruptible_exclusive()include/linux/wait.h+2 -200 replies
10/16sched/wait: Collapse __wait_event_lock_irq()include/linux/wait.h+6 -140 replies
11/16sched/wait: Collapse __wait_event_interruptible_lock_irq()include/linux/wait.h+6 -200 replies
12/16sched/wait: Collapse __wait_event_interruptible_lock_irq_timeout()include/linux/wait.h+6 -190 replies
13/16sched/wait: Collapse __wait_event_interruptible_tty()include/linux/tty.h+4 -170 replies
14/16sched/wait: Collapse __wait_event_killable()include/linux/wait.h+1 -160 replies
15/16sched/wait: Collapse __wait_event_hrtimeout()include/linux/wait.h+2 -130 replies
16/16sched/wait: Make the __wait_event*() interface more friendlyarch/mips/kernel/rtlx.c include/linux/tty.h include/linux/wait.h +2 more+73 -810 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchOleg NesterovIngo Molnar
SeriesR-b R-b R-b R-b
1/16R-b
2/16R-b
3/16R-b
4/16R-b
5/16R-b
6/16R-b
7/16R-b
8/16R-b
9/16R-b
10/16R-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/16] sched/wait: Collapse __wait_event macros -v5

While poking at the cpu hotplug implementation I had a desire to use wait_event() with schedule_preempt_disabled() and found the ridiculous amount of duplication in linux/wait.h.

These patches cure all the bloat and inconsistencies of these macros that me and others noticed, while also making it 'trivial' to generate new variants.

Compile and boot tested on x86_64.

Changes since -v4:
- split up the big collapse patch into 11 separate patches

Changes since -v3:
- added LKML to the CC (D'0h!!)
- introduced ___wait_cond_timeout() to avoid double evaluation of 'condition'

Changes since -v2:
- removed ___wait_cmd_lock_irq(), ___wait_cmd_lock_irq_timo()
- renamed ___wait_cmd_test_timeout() to ___wait_test_timeout()
- renamed ___wait_cmd_schedule_timeout() to ___wait_sched_timeout()
- fixed schedule_timeout() invocations in patch 6; don't restart a schedule_timeout() at the total timeout; rather continue where we left off for a total fixed timeout.
- use 'long' return type for ___wait_event() so that timeout values for schedule_timeout() fit.
- fix wait_event_interruptible_lock_irq_timeout() and use long return type.

---
 arch/mips/kernel/rtlx.c         |   19 +-
 include/linux/tty.h             |   28 +---
 include/linux/wait.h            |  268 +++++++++++++---------------------------
 net/irda/af_irda.c              |    5 
 net/netfilter/ipvs/ip_vs_sync.c |    7 -
 5 files changed, 108 insertions(+), 219 deletions(-)