From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Gleixner <tglx@linutronix.de>,
Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
Anna-Maria Gleixner <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: UML time-travel warning from __run_timers
Date: Mon, 04 Apr 2022 09:02:09 +0200 [thread overview]
Message-ID: <ff314e8556aba7e231ab80c46b30701142e82a43.camel@sipsolutions.net> (raw)
In-Reply-To: <87pmlykksj.ffs@tglx>
On Sun, 2022-04-03 at 21:51 +0200, Thomas Gleixner wrote:
>
> > There was no timer. If there's ever a timer on this base (BASE_DEF) then
> > this doesn't happen.
>
> You said:
>
> > > > init_timer_cpu(0) base 0 clk=0xffff8ad0, next_expiry=0x13fff8acf
> > > > init_timer_cpu(0) base 1 clk=0xffff8ad0, next_expiry=0x13fff8acf
>
> which confused me. It's actually initialized to:
>
> base->clk + NEXT_TIMER_MAX_DELTA
>
> but that's fine and it is overwritten by every timer which is inserted
> to expire before that. So that's not an issue as the prandom timer is
> firing and rearmed.
No, as I said before, there's never any timer with base 1 (BASE_DEF) in
the config we have. The prandom timer is not TIMER_DEFERRABLE (it
probably could be, but it's not now). There's no deferrable timer at
all. Once there is at least one, the warning goes away.
> That would not happen if next_expiry would stay at 0x13fff8acf. The
> first one in your trace expires at 5339070200, i.e. 0x13e3bbef8, which
> is way before that.
But it's not a deferrable timer, so it's on another timer wheel (base),
so it doesn't affect the "base 1" part above.
> Can you please apply the debug patch below and run with the same
> parameters as before?
>
> Thanks,
>
> tglx
> ---
> Hint: I tried to figure out how to use that time travel muck, but did
> not get to the point where I bothered to try myself. Might be
> either my incompetence or lack of documentation. Clearly the bug
> report lacks any hint how to reproduce that problem.
Well, the original bug report did have all the information, I gave the
link to it before:
https://lore.kernel.org/r/20220330110156.GA9250@axis.com
With that kernel config and command line, you can reproduce it easily.
All you need to know is to use "make ARCH=um" with that .config file :)
> + trace_printk("RUN: now=%lu clk=%lu next_expiry=%lu
> recalc=%d\n",
> + jiffies, base->clk, base->next_expiry,
> + base->next_expiry_recalc);
IMHO all of this extra debug is a waste of time since you're not
differentiating the two bases anywhere. You'll just get confused (as
above) since timers do happen on BASE_STD, just not on BASE_DEF.
johannes
next prev parent reply other threads:[~2022-04-04 7:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 11:01 Vincent Whitchurch
2022-03-30 12:33 ` Johannes Berg
2022-04-02 14:09 ` Johannes Berg
2022-04-02 14:17 ` Johannes Berg
2022-04-03 16:18 ` Thomas Gleixner
2022-04-03 17:13 ` Johannes Berg
2022-04-03 17:19 ` Johannes Berg
2022-04-03 23:23 ` Thomas Gleixner
2022-04-03 19:51 ` Thomas Gleixner
2022-04-04 7:02 ` Johannes Berg [this message]
2022-04-04 8:32 ` Thomas Gleixner
2022-04-04 8:37 ` Johannes Berg
2022-04-04 12:17 ` 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=ff314e8556aba7e231ab80c46b30701142e82a43.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=tglx@linutronix.de \
--cc=vincent.whitchurch@axis.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®