Skip to content

timer: Refactor the timer wheel

Thomas Gleixner lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest22 patches 7 repliesIn review
  2. v220 patches 31 repliesSuperseded
  3. v120 patches 34 repliesSuperseded

Changes in v3 from the cover letter

- Removed the 1000Hz granularity reduction to 4ms. Eric explained that datacenter workloads require the granularity in the first level wheel.

- Fixed the typo in tilepro.

- Converted sigtimedwait() to hrtimers

- To avoid the cascading I extended the wheel by another level. This removes the rarely executed cascading code path, but increases the storage size for HZ>100 slightly. If the tiny folks care, there is an simple option to cut the storage size in half for the price of reduced granularity.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22timer: Make pinned a timer propertyinclude/linux/timer.h kernel/time/timer.c+27 -81 reply
2/22x86/apic/uv: Initialize timer as pinnedarch/x86/kernel/apic/x2apic_uv_x.c+2 -20 replies
3/22x86/mce: Initialize timer as pinnedarch/x86/kernel/cpu/mcheck/mce.c+2 -20 replies
4/22cpufreq/powernv: Initialize timer as pinneddrivers/cpufreq/powernv-cpufreq.c+2 -30 replies
5/22driver/net/ethernet/tile: Initialize timer as pinneddrivers/net/ethernet/tile/tilepro.c+2 -20 replies
6/22drivers/tty/metag_da: Initialize timer as pinneddrivers/tty/metag_da.c+2 -20 replies
7/22drivers/tty/mips_ejtag: Initialize timer as pinneddrivers/tty/mips_ejtag_fdc.c+2 -20 replies
8/22net/ipv4/inet: Initialize timers as pinnednet/ipv4/inet_connection_sock.c net/ipv4/inet_timewait_sock.c+7 -50 replies
9/22timer: Remove mod_timer_pinnedinclude/linux/timer.h kernel/time/timer.c+5 -370 replies
10/22signal: Use hrtimer for sigtimedwaitkernel/signal.c+10 -140 replies
11/22hlist: Add hlist_is_singular_node() helperinclude/linux/list.h+10 -00 replies
12/22timer: Give a few structs and members proper nameskernel/time/timer.c+59 -590 replies
13/22timer: Reduce the CPU index space to 256kinclude/linux/timer.h+5 -51 reply
14/22timer: Switch to a non cascading wheelinclude/linux/timer.h kernel/time/timer.c+467 -3600 replies
15/22timer: Remove slack leftoversblock/genhd.c drivers/mmc/host/jz4740_mmc.c drivers/power/bq27xxx_battery.c +5 more+1 -380 replies
16/22timer: Move __run_timers() functionkernel/time/timer.c+26 -260 replies
17/22timer: Optimize collect timers for NOHZkernel/time/timer.c+41 -80 replies
18/22tick/sched: Remove pointless empty functionkernel/time/tick-sched.c+1 -320 replies
19/22timer: Forward wheel clock whenever possiblekernel/time/tick-internal.h kernel/time/tick-sched.c kernel/time/timer.c+114 -232 replies
20/22timer: Only wake softirq if necessarykernel/time/timer.c+11 -00 replies
21/22timer: Split out index calculationkernel/time/timer.c+31 -140 replies
22/22timer: Optimization for same expiry time in mod_timer()kernel/time/timer.c+35 -160 replies

Reviews trailers per patch

None of the 22 patches has a Reviewed-by or Acked-by.

PatchPaul E. McKenney
SeriesT-b
1/22
2/22
3/22
4/22
5/22
6/22
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22
22/22

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

Read the v3 thread

Cover letter [patch V3 00/22] timer: Refactor the timer wheel

This is the third version of the timer wheel rework series. The previous versions can be found here:

V1:   http://lkml.kernel.org/r/[email protected]
V2:   http://lkml.kernel.org/r/[email protected]

The series is also available in git:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.timers

Changes vs. V2:

- Removed the 1000Hz granularity reduction to 4ms. Eric explained that datacenter workloads require the granularity in the first level wheel.

- Fixed the typo in tilepro.

- Converted sigtimedwait() to hrtimers

- To avoid the cascading I extended the wheel by another level. This removes the rarely executed cascading code path, but increases the storage size for HZ>100 slightly. If the tiny folks care, there is an simple option to cut the storage size in half for the price of reduced granularity.

Thanks,

tglx

----

 arch/x86/kernel/apic/x2apic_uv_x.c  |    4 
 arch/x86/kernel/cpu/mcheck/mce.c    |    4 
 block/genhd.c                       |    5 
 drivers/cpufreq/powernv-cpufreq.c   |    5 
 drivers/mmc/host/jz4740_mmc.c       |    2 
 drivers/net/ethernet/tile/tilepro.c |    4 
 drivers/power/bq27xxx_battery.c     |    5 
 drivers/tty/metag_da.c              |    4 
 drivers/tty/mips_ejtag_fdc.c        |    4 
 drivers/usb/host/ohci-hcd.c         |    1 
 drivers/usb/host/xhci.c             |    2 
 include/linux/list.h                |   10 
 include/linux/timer.h               |   34 -
 kernel/signal.c                     |   24 
 kernel/time/tick-internal.h         |    1 
 kernel/time/tick-sched.c            |   46 -
 kernel/time/timer.c                 | 1096 +++++++++++++++++++++---------------
 lib/random32.c                      |    1 
 net/ipv4/inet_connection_sock.c     |    7 
 net/ipv4/inet_timewait_sock.c       |    5 
 20 files changed, 734 insertions(+), 530 deletions(-)