From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@codeaurora.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 0/5] Arch-generic sched_clock NMI safety and optimizations for -tip
Date: Tue, 17 Mar 2015 10:38:21 -0700 [thread overview]
Message-ID: <1426613906-19718-1-git-send-email-john.stultz@linaro.org> (raw)
Ingo, Peter, Thomas,
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: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
These patches can also be pulled from the pull request below.
The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539:
Linux 4.0-rc1 (2015-02-22 18:21:14 -0800)
are available in the git repository at:
https://git.linaro.org/people/john.stultz/linux.git fortglx/4.1/schedclock
for you to fetch changes up to 4bb74b85d2e74cfec9e21a6de44b232a2983bcc7:
sched_clock: Avoid deadlock during read from NMI (2015-03-10 20:28:58 -0700)
----------------------------------------------------------------
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
next reply other threads:[~2015-03-17 17:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 17:38 John Stultz [this message]
2015-03-17 17:38 ` [PATCH 1/5] sched_clock: Match scope of read and write seqcounts John Stultz
2015-03-17 17:38 ` [PATCH 2/5] sched_clock: Optimize cache line usage John Stultz
2015-03-17 17:38 ` [PATCH 3/5] sched_clock: Remove suspend from clock_read_data John Stultz
2015-03-17 17:38 ` [PATCH 4/5] sched_clock: Remove redundant notrace from update function John Stultz
2015-03-17 17:38 ` [PATCH 5/5] sched_clock: Avoid deadlock during read from NMI John Stultz
2015-03-17 17:55 ` [PATCH 0/5] Arch-generic sched_clock NMI safety and optimizations for -tip Peter Zijlstra
2015-03-25 9:09 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426613906-19718-1-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=daniel.thompson@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sboyd@codeaurora.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®