[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241118191813.145031fc@gandalf.local.home>
Date: Mon, 18 Nov 2024 19:18:13 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Joel Fernandes <joelaf@...gle.com>
Cc: Suleiman Souhlal <suleiman@...gle.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
<dietmar.eggemann@....com>, Ben Segall <bsegall@...gle.com>, Mel Gorman
<mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>, Paolo Bonzini
<pbonzini@...hat.com>, seanjc@...gle.com, Srikar Dronamraju
<srikar@...ux.ibm.com>, David Woodhouse <dwmw2@...radead.org>,
vineethrp@...gle.com, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
ssouhlal@...ebsd.org
Subject: Re: [PATCH v3] sched: Don't try to catch up excess steal time.
On Tue, 19 Nov 2024 09:10:41 +0900
Joel Fernandes <joelaf@...gle.com> wrote:
> > > +++ b/kernel/sched/core.c
> > > @@ -766,13 +766,15 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)
> > > #endif
> > > #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
> > > if (static_key_false((¶virt_steal_rq_enabled))) {
> > > - steal = paravirt_steal_clock(cpu_of(rq));
> > > + u64 prev_steal;
> > > +
> > > + steal = prev_steal = paravirt_steal_clock(cpu_of(rq));
> > > steal -= rq->prev_steal_time_rq;
> > >
> > > if (unlikely(steal > delta))
> > > steal = delta;
> >
> > So is the problem just the above if statement? That is, delta is already
> > calculated, but if we get interrupted by the host before steal is
> > calculated and the time then becomes greater than delta, the time
> > difference between delta and steal gets pushed off to the next task, right?
>
> Pretty much.. the steal being capped to delta means the rest of the
> steal is pushed off to the future. Instead he discards the remaining
> steal after this patch.
Thanks for confirming. I just wanted to make sure I understand as the
initial change log went into a lot of detail where I sorta got lost ;-)
-- Steve
Powered by blists - more mailing lists