All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>,
	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 10:32:46 +0200	[thread overview]
Message-ID: <87ee2dl041.ffs@tglx> (raw)
In-Reply-To: <ff314e8556aba7e231ab80c46b30701142e82a43.camel@sipsolutions.net>

On Mon, Apr 04 2022 at 09:02, Johannes Berg wrote:
> On Sun, 2022-04-03 at 21:51 +0200, Thomas Gleixner wrote:
>> 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.

Groan. I overlooked the deferrable part. Yes, you are right. next_expiry
of the deferrable base is stale when there is no timer queued up to the
point where base->clk reaches the initial next_expiry value. So the
check is bogus.

Thanks,

        tglx
---
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1724,9 +1724,8 @@ static inline void __run_timers(struct t
 		/*
 		 * The only possible reason for not finding any expired
 		 * timer at this clk is that all matching timers have been
-		 * dequeued.
+		 * dequeued or no timer has been ever queued.
 		 */
-		WARN_ON_ONCE(!levels && !base->next_expiry_recalc);
 		base->clk++;
 		base->next_expiry = __next_timer_interrupt(base);
 






_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>,
	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 10:32:46 +0200	[thread overview]
Message-ID: <87ee2dl041.ffs@tglx> (raw)
In-Reply-To: <ff314e8556aba7e231ab80c46b30701142e82a43.camel@sipsolutions.net>

On Mon, Apr 04 2022 at 09:02, Johannes Berg wrote:
> On Sun, 2022-04-03 at 21:51 +0200, Thomas Gleixner wrote:
>> 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.

Groan. I overlooked the deferrable part. Yes, you are right. next_expiry
of the deferrable base is stale when there is no timer queued up to the
point where base->clk reaches the initial next_expiry value. So the
check is bogus.

Thanks,

        tglx
---
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1724,9 +1724,8 @@ static inline void __run_timers(struct t
 		/*
 		 * The only possible reason for not finding any expired
 		 * timer at this clk is that all matching timers have been
-		 * dequeued.
+		 * dequeued or no timer has been ever queued.
 		 */
-		WARN_ON_ONCE(!levels && !base->next_expiry_recalc);
 		base->clk++;
 		base->next_expiry = __next_timer_interrupt(base);
 






  reply	other threads:[~2022-04-04  8:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 11:01 UML time-travel warning from __run_timers Vincent Whitchurch
2022-03-30 11:01 ` Vincent Whitchurch
2022-03-30 12:33 ` Johannes Berg
2022-03-30 12:33   ` Johannes Berg
2022-04-02 14:09 ` Johannes Berg
2022-04-02 14:09   ` Johannes Berg
2022-04-02 14:17   ` Johannes Berg
2022-04-02 14:17     ` Johannes Berg
2022-04-03 16:18   ` Thomas Gleixner
2022-04-03 16:18     ` Thomas Gleixner
2022-04-03 17:13     ` Johannes Berg
2022-04-03 17:13       ` Johannes Berg
2022-04-03 17:19       ` Johannes Berg
2022-04-03 17:19         ` Johannes Berg
2022-04-03 23:23         ` Thomas Gleixner
2022-04-03 23:23           ` Thomas Gleixner
2022-04-03 19:51       ` Thomas Gleixner
2022-04-03 19:51         ` Thomas Gleixner
2022-04-04  7:02         ` Johannes Berg
2022-04-04  7:02           ` Johannes Berg
2022-04-04  8:32           ` Thomas Gleixner [this message]
2022-04-04  8:32             ` Thomas Gleixner
2022-04-04  8:37             ` Johannes Berg
2022-04-04  8:37               ` Johannes Berg
2022-04-04 12:17               ` Thomas Gleixner
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=87ee2dl041.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.