[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YheE0joXm53Hxn4J@fuller.cnet>
Date: Thu, 24 Feb 2022 10:14:58 -0300
From: Marcelo Tosatti <mtosatti@...hat.com>
To: Aaron Tomlin <atomlin@...mlin.com>
Cc: Frederic Weisbecker <frederic@...nel.org>,
Christoph Lameter <cl@...ux.com>, tglx@...utronix.de,
mingo@...nel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Phil Auld <pauld@...hat.com>
Subject: Re: [RFC PATCH] tick/sched: Ensure quiet_vmstat() is called when the
idle tick was stopped too
On Thu, Feb 24, 2022 at 01:00:14PM +0000, Aaron Tomlin wrote:
> On Thu 2022-02-24 09:27 -0300, Marcelo Tosatti wrote:
> > But Aaron, vmstat_shepherd should be ensuring that per-CPU vmstat_update
> > work are queued, if the per-CPU vmstat are out of sync.
>
> Hi Marcelo,
>
> Yes, I agree; albeit, as far as I understand, in the context of a nohz_full
> CPU that has its scheduling-clock tick stopped, we cannot rely on any
> deferred work.
>
> The purpose of my patch was to prevent a nohz_full CPU from entering idle
> state when CPU-specific vmstat data is non-zero.
>
> > And:
> >
> > static void
> > trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
> > {
> > if (!is_timers_nohz_active())
> > return;
> >
> > /*
> > * TODO: This wants some optimizing similar to the code below, but we
> > * will do that when we switch from push to pull for deferrable timers.
> > */
> > if (timer->flags & TIMER_DEFERRABLE) {
> > if (tick_nohz_full_cpu(base->cpu))
> > wake_up_nohz_cpu(base->cpu);
> > return;
> > }
> >
> > * @TIMER_DEFERRABLE: A deferrable timer will work normally when the
> > * system is busy, but will not cause a CPU to come out of idle just
> > * to service it; instead, the timer will be serviced when the CPU
> > * eventually wakes up with a subsequent non-deferrable timer.
> >
> > You'd want that vmstat_update to execute regardless of whether there are
> > armed non-deferrable timers.
> >
> > Should fix both 1 and 2 AFAICS.
> >
>
> If I understand correctly, you are suggesting to switch to a non-deferred
> timer for such work when the scheduling-clock tick is stopped? Indeed, it
> would address both scenarios yet I'm not sure we'd want that due to the
> performance impact which might be more than negligible.
Aaron,
If the per-CPU vmstat_update is limited to happen once per second, that
shouldnt be a significant performance impact?
Powered by blists - more mailing lists