public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] timer: Check thread timers only when there are active thread timers
@ 2015-08-26 17:04 George Spelvin
  2015-08-26 17:41 ` Jason Low
  0 siblings, 1 reply; 3+ messages in thread
From: George Spelvin @ 2015-08-26 17:04 UTC (permalink / raw)
  To: jason.low2; +Cc: akpm, linux, linux-kernel


-	check_thread_timers(tsk, &firing);
+	if (!task_cputime_zero(&tsk->cputime_expires))
+		check_thread_timers(tsk, &firing);

Sincere question; I'm not certain myself: would it make more sense to put
this shortcut into check_thread_timers()?

It seems more like an optimization of that function than something the
caller needs to know about.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 0/3] timer: Improve itimers scalability
@ 2015-08-26  3:17 Jason Low
  2015-08-26  3:17 ` [PATCH 2/3] timer: Check thread timers only when there are active thread timers Jason Low
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Low @ 2015-08-26  3:17 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Oleg Nesterov,
	Paul E. McKenney
  Cc: linux-kernel, Frederic Weisbecker, Linus Torvalds,
	Davidlohr Bueso, Steven Rostedt, Andrew Morton, Terry Rudd,
	Rik van Riel, Scott J Norton, Jason Low

When running a database workload on a 16 socket machine, there were
scalability issues related to itimers.

Commit 1018016c706f addressed the issue with the thread_group_cputimer
spinlock taking up a significant portion of total run time.

This patch series address the other 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%.

Jason Low (3):
  timer: Optimize fastpath_timer_check()
  timer: Check thread timers only when there are active thread timers
  timer: Reduce unnecessary sighand lock contention

 include/linux/init_task.h      |    1 +
 include/linux/sched.h          |    3 ++
 kernel/time/posix-cpu-timers.c |   44 +++++++++++++++++++++++++++------------
 3 files changed, 34 insertions(+), 14 deletions(-)

-- 
1.7.2.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-26 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 17:04 [PATCH 2/3] timer: Check thread timers only when there are active thread timers George Spelvin
2015-08-26 17:41 ` Jason Low
  -- strict thread matches above, loose matches on Subject: below --
2015-08-26  3:17 [PATCH 0/3] timer: Improve itimers scalability Jason Low
2015-08-26  3:17 ` [PATCH 2/3] timer: Check thread timers only when there are active thread timers Jason Low

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox