Re: [PATCH v5 00/12] fold per-CPU vmstats remotely

From: Michal Hocko
Date: Tue Mar 14 2023 - 08:34:41 EST


On Mon 13-03-23 13:25:07, Marcelo Tosatti wrote:
> This patch series addresses the following two problems:
>
> 1. A customer provided some evidence which indicates that
> the idle tick was stopped; albeit, CPU-specific vmstat
> counters still remained populated.
>
> Thus one can only assume quiet_vmstat() was not
> invoked on return to the idle loop. If I understand
> correctly, I suspect this divergence might erroneously
> prevent a reclaim attempt by kswapd. If the number of
> zone specific free pages are below their per-cpu drift
> value then zone_page_state_snapshot() is used to
> compute a more accurate view of the aforementioned
> statistic. Thus any task blocked on the NUMA node
> specific pfmemalloc_wait queue will be unable to make
> significant progress via direct reclaim unless it is
> killed after being woken up by kswapd
> (see throttle_direct_reclaim())

I have hard time to follow the actual problem described above. Are you
suggesting that a lack of pcp vmstat counters update has led to
reclaim issues? What is the said "evidence"? Could you share more of the
story please?

> 2. With a SCHED_FIFO task that busy loops on a given CPU,
> and kworker for that CPU at SCHED_OTHER priority,
> queuing work to sync per-vmstats will either cause that
> work to never execute, or stalld (i.e. stall daemon)
> boosts kworker priority which causes a latency
> violation

Why is that a problem? Out-of-sync stats shouldn't cause major problems.
Or can they?

Thanks!
--
Michal Hocko
SUSE Labs