[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCpAvrfALpGu034rBkLpQba88O5Zm3LtQxHJ6_aZOEe2zg@mail.gmail.com>
Date: Tue, 28 Jan 2025 20:10:54 -0800
From: John Stultz <jstultz@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>, Stephen Boyd <sboyd@...nel.org>,
Yury Norov <yury.norov@...il.com>, Bitao Hu <yaoma@...ux.alibaba.com>,
Andrew Morton <akpm@...ux-foundation.org>, kernel-team@...roid.com
Subject: Re: [RFC][PATCH 1/3] time/tick: Pipe tick count down through cputime accounting
On Tue, Jan 28, 2025 at 6:44 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> On Mon, Jan 27 2025 at 22:32, John Stultz wrote:
> > In working up the dynHZ patch, I found that the skipping of
> > ticks would result in large latencies for itimers.
> >
> > As I dug into it, I realized there is still some logic that
> > assumes we don't miss ticks, resulting in late expiration of
> > cputime timers.
> >
> > So this patch pipes the actual number of ticks passed down
> > through cputime accounting.
>
> This word salad does not qualify as a proper technical changelog. See
> Documentation/
>
> > /*
> > * Must be called with interrupts disabled !
> > */
> > -static void tick_do_update_jiffies64(ktime_t now)
> > +static unsigned long tick_do_update_jiffies64(ktime_t now)
> > {
> > unsigned long ticks = 1;
> > ktime_t delta, nextp;
> > @@ -70,7 +70,7 @@ static void tick_do_update_jiffies64(ktime_t now)
> > */
> > if (IS_ENABLED(CONFIG_64BIT)) {
> > if (ktime_before(now, smp_load_acquire(&tick_next_period)))
> > - return;
> > + return 0;
>
> So if the CPU's tick handler does not update jiffies, then this returns
> zero ticks....
Oh, bah! You're right, of course.
I was thinking I could grab the tick delta that way, but blanked that
it wouldn't work anywhere but on the one tick_cpu.
I guess I was getting lucky with my tests running mainly on the tick_cpu.
I'll go back to the drawing board on this one. Thanks for pointing this out.
-john
Powered by blists - more mailing lists