From: Jeremiah Mahler <jmmahler@gmail.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
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>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [BUG, bisect] hrtimer: severe lag after suspend & resume
Date: Thu, 4 Jun 2015 17:01:42 -0700 [thread overview]
Message-ID: <20150605000142.GA1761@hudson.localdomain> (raw)
In-Reply-To: <CALAqxLUAXDHimaqA0mqUNcY0inOZGRf92SxSbX8dDMzJUBRvmQ@mail.gmail.com>
John,
On Thu, Jun 04, 2015 at 03:54:35PM -0700, John Stultz wrote:
> On Wed, Jun 3, 2015 at 5:56 PM, Jeremiah Mahler <jmmahler@gmail.com> wrote:
[...]
>
>
> So I suspect the problem is the change to clock_was_set_seq in
> timekeeping_update is done prior to mirroring the time state to the
> shadow-timekeeper. Thus the next time we do update_wall_time() the
> updated sequence is overwritten by whats in the shadow copy. The
> attached patch moving the modification up seems to avoid the issue for
> me.
>
> Thomas: Looking at the problematic change, I'm not a big fan of it.
> Caching timekeeping state here in the hrtimer code has been a source
> of bugs in the past, and I'm not sure I see how avoiding copying
> 24bytes is that big of a win. Especially since it adds more state to
> the timekeeper and hrtimer base that we have to read and mange.
> Personally I'd prefer a revert to my fix.
>
> thanks
> -john
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index 90ed5db..53be796 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -580,6 +580,9 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action)
> ntp_clear();
> }
>
> + if (action & TK_CLOCK_WAS_SET)
> + tk->clock_was_set_seq++;
> +
> tk_update_ktime_data(tk);
>
> update_vsyscall(tk);
> @@ -591,9 +594,6 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action)
>
> update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono);
> update_fast_timekeeper(&tk->tkr_raw, &tk_fast_raw);
> -
> - if (action & TK_CLOCK_WAS_SET)
> - tk->clock_was_set_seq++;
> }
>
> /**
That patch fixes the problem for me.
Thanks John.
--
- Jeremiah Mahler
next prev parent reply other threads:[~2015-06-05 0:01 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 [this message]
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
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=20150605000142.GA1761@hudson.localdomain \
--to=jmmahler@gmail.com \
--cc=fweisbec@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=tglx@linutronix.de \
--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®