public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5 (rebase resend)] Arch-generic sched_clock NMI safety and optimizations for -tip
@ 2015-03-26 19:23 John Stultz
  2015-03-26 19:23 ` [PATCH 1/5] sched_clock: Match scope of read and write seqcounts John Stultz
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: John Stultz @ 2015-03-26 19:23 UTC (permalink / raw)
  To: lkml
  Cc: John Stultz, Russell King, Will Deacon, Catalin Marinas,
	Daniel Thompson, Thomas Gleixner, Stephen Boyd, Peter Zijlstra,
	Ingo Molnar

Ingo, Peter, Thomas,

(No real changes since last time, only rebased ontop of tip/timers/core
so as to avoid the collision caused by some of my patches there. Also
resent as patches instead of pull request, since Ingo asked)

The following patches from Daniel extend the arch-generic sched_clock
implementation so that it can be safely called from NMI (or FIQ on ARM)
context. They also optimize the sched_clock logic to improve cache
performance. I wanted to send them along so they could be queued in
-tip for 4.1.

>From Daniel's last post:
"The data cache profile of sched_clock() in both the original code and
my previous patch was somewhere between 2 and 3 (64-byte) cache lines,
depending on alignment of struct clock_data. After patching, the cache
profile for the normal case should be a single cacheline.

NMI safety was tested on i.MX6 with perf drowning the system in FIQs and
using the perf handler to check that sched_clock() returned monotonic
values. At the same time I forcefully reduced kt_wrap so that
update_sched_clock() is being called at >1000Hz.

Without the patches the above system is grossly unstable, surviving
[9K,115K,25K] perf event cycles during three separate runs. With the
patch I ran for over 9M perf event cycles before getting bored."

I'm relaying these along because in the past I've queued and submitted
arch-generic sched_clock.c changes from Stephen via Thomas, but I wanted
to make sure this got a look from Ingo and Peter.

In the future, I think Stephen is probably the right person to act as
patch-catcher for the kernel/time/sched_clock.c file. But I think those
changes should continue to be merged in via the -tip tree w/ other
scheduler code.

Let me know if you have any objections or concerns.

thanks
-john

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>

Daniel Thompson (5):
  sched_clock: Match scope of read and write seqcounts
  sched_clock: Optimize cache line usage
  sched_clock: Remove suspend from clock_read_data
  sched_clock: Remove redundant notrace from update function
  sched_clock: Avoid deadlock during read from NMI

 kernel/time/sched_clock.c | 195 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 138 insertions(+), 57 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2015-03-27  7:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 19:23 [PATCH 0/5 (rebase resend)] Arch-generic sched_clock NMI safety and optimizations for -tip John Stultz
2015-03-26 19:23 ` [PATCH 1/5] sched_clock: Match scope of read and write seqcounts John Stultz
2015-03-27  7:41   ` [tip:timers/core] timers, sched/clock: " tip-bot for Daniel Thompson
2015-03-26 19:23 ` [PATCH 2/5] sched_clock: Optimize cache line usage John Stultz
2015-03-27  7:41   ` [tip:timers/core] timers, sched/clock: " tip-bot for Daniel Thompson
2015-03-26 19:23 ` [PATCH 3/5] sched_clock: Remove suspend from clock_read_data John Stultz
2015-03-27  7:42   ` [tip:timers/core] timers, sched/clock: Remove suspend from clock_read_data() tip-bot for Daniel Thompson
2015-03-26 19:23 ` [PATCH 4/5] sched_clock: Remove redundant notrace from update function John Stultz
2015-03-27  7:42   ` [tip:timers/core] timers, sched/clock: " tip-bot for Daniel Thompson
2015-03-26 19:23 ` [PATCH 5/5] sched_clock: Avoid deadlock during read from NMI John Stultz
2015-03-27  7:42   ` [tip:timers/core] timers, sched/clock: " tip-bot for Daniel Thompson

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