lkml.org 
[lkml]   [2022]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/2] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too
On Tue 2022-08-16 15:11 -0300, Marcelo Tosatti wrote:
> Aaron,
>
> It is also necessary to remove the delayed_work_pending check from
> quiet_vmstat:
>
> @@ -1987,10 +1970,7 @@ void quiet_vmstat(void)
> if (system_state != SYSTEM_RUNNING)
> return;
>
> - if (!delayed_work_pending(this_cpu_ptr(&vmstat_work)))
> - return;
> -
> - if (!need_update(smp_processor_id()))
> + if (!__this_cpu_read(vmstat_dirty))
> return;
>
>
> Because, consider the following situation:
>
>
> vmstat_shepherd CPU nohz_full CPU
>
>
> vmstat_dirty = false
> enter nohz_full
> return to userspace
> check vmstat_dirty, unset,
> delayed work cancelled.
> dirties per-CPU vmstats
> vmstat_dirty = true
> return to userspace
> (quiet_vmstat will skip
> clearing stats because
> delayed work was not queued).

Hi Marcelo,

Yes, I agree - the above scenario can occur.


Kind regards,

--
Aaron Tomlin

\
 
 \ /
  Last update: 2022-08-17 18:49    [W:0.044 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site