lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2022-02-24 14:17    [W:0.061 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site