From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <john.stultz@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Jeremiah Mahler <jmmahler@gmail.com>,
Preeti U Murthy <preeti@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Marcelo Tosatti <mtosatti@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [BUG, bisect] hrtimer: severe lag after suspend & resume
Date: Mon, 8 Jun 2015 21:31:53 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1506082023540.4133@nanos> (raw)
In-Reply-To: <CALAqxLWKDtrxa8HFK1Mg78hsA4iX0UXmWpCh3YM0q4SwwWOxGA@mail.gmail.com>
On Mon, 8 Jun 2015, John Stultz wrote:
> On Mon, Jun 8, 2015 at 12:44 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > Well, the problem is that we need to fetch that data on several
> > occasions:
> >
> > - hrtimer_start (if it is the first expiring timer of a clock)
> > - hrtimer_reprogram (after canceling the first timer)
> > - hrtimer_interrupt
>
> hrtimer_interrupt is really the one I'm most concerned with, because
> that's what does timer expiration. For that usage, having duplicated
> time state has been repeatedly problematic.
And hurting performance just to solve problematic issues is definitely
not a solution either.
> Right, so without my proposed patch, this is an issue, but my proposed
> patch requires that the hrtimer_interrupt not use cached offsets in
> order to ensure the read-state is adjusted properly for the
> leapsecond. (Or it requries the hrtimer_interrupt path to also cache
> the leapsecond state so it can do the same adjustment to the cached
> data, but this seems terribly duplicative).
No, we can be smarter than that, really.
> But seriously, I'm earnestly looking for specifics (like which stress
> tests are you caring about) here, so I can try to also watch that
> patches I write or take don't undo your performance optimizations, so
> in the future you'll have to yell at fewer people.
I'm often using cyclictest or a variant of it which can arm more
timers. I play with various configurations for this, so I can't give a
receipe right away. Will try to remember when I play with it next
time.
> Even outside of my leapsecond correctness concern, I think caching
> time state like you're doing here is a maintenance issue. It has bit
> us a number of times already, and things are complicated enough that
> even fixing the issues that stem from it are non-trivial.
The caching is solely a problem for this silly leap second corner
case. So sacrifying performance for the general case just to solve
this particular issue is really the wrong answer. We know that it is
problematic, so we can have tests which verify that it did not break.
Sure it requires a bit more brain cycles to get it right, but that's
well worth spent cycles.
Thanks,
tglx
next prev parent reply other threads:[~2015-06-08 19:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 0:56 Jeremiah Mahler
2015-06-04 11:22 ` Thomas Gleixner
2015-06-04 20:13 ` Jeremiah Mahler
2015-06-04 22:54 ` John Stultz
2015-06-05 0:01 ` Jeremiah Mahler
2015-06-05 7:57 ` Ingo Molnar
2015-06-05 9:14 ` Thomas Gleixner
2015-06-05 10:07 ` Ingo Molnar
2015-06-05 18:52 ` John Stultz
2015-06-08 7:44 ` Thomas Gleixner
2015-06-08 17:37 ` John Stultz
2015-06-08 19:31 ` Thomas Gleixner [this message]
2015-06-05 14:02 ` Thomas Gleixner
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=alpine.DEB.2.11.1506082023540.4133@nanos \
--to=tglx@linutronix.de \
--cc=fweisbec@gmail.com \
--cc=jmmahler@gmail.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=preeti@linux.vnet.ibm.com \
--cc=viresh.kumar@linaro.org \
/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®