Skip to content

timer: Improve itimers scalability

Jason Low lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 8 repliesIn review
  2. v13 patches 23 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4timer: Optimize fastpath_timer_check()kernel/time/posix-cpu-timers.c+3 -80 replies
2/4timer: Check thread timers only when there are active thread timerskernel/time/posix-cpu-timers.c+16 -60 replies
3/4timer: Convert cputimer->running to boolinclude/linux/init_task.h include/linux/sched.h kernel/fork.c +1 more+7 -70 replies
4/4timer: Reduce unnecessary sighand lock contentioninclude/linux/init_task.h include/linux/sched.h kernel/time/posix-cpu-timers.c+28 -20 replies

Reviews trailers per patch

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

PatchOleg NesterovFrederic WeisbeckerDavidlohr BuesoGeorge Spelvin
SeriesR-b
1/4R-b R-b R-b
2/4R-b
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] timer: Improve itimers scalability

While running a database workload on a 16 socket machine, there were scalability issues related to itimers. The following link contains a more detailed summary of the issues at the application level.

https://lkml.org/lkml/2015/8/26/737

Commit 1018016c706f addressed the issue with the thread_group_cputimer spinlock taking up a significant portion of total run time. This patch series addresses the secondary issue where a lot of time is spent trying to acquire the sighand lock. It was found in some cases that 200+ threads were simultaneously contending for the same sighand lock, reducing throughput by more than 30%.

With this patch set (along with commit 1018016c706f mentioned above), the performance hit of itimers almost completely goes away on the 16 socket system.

Jason Low (4):
timer: Optimize fastpath_timer_check()
timer: Check thread timers only when there are active thread timers
timer: Convert cputimer->running to bool
timer: Reduce unnecessary sighand lock contention

 include/linux/init_task.h      |    3 +-
 include/linux/sched.h          |    9 ++++--
 kernel/fork.c                  |    2 +-
 kernel/time/posix-cpu-timers.c |   63 ++++++++++++++++++++++++++++-----------
 4 files changed, 54 insertions(+), 23 deletions(-)
Signature · 1 line
1.7.2.5