Re: [PATCH 0/2] Separate NUMA statistics from zone statistics

From: Dave Hansen
Date: Wed Aug 23 2017 - 00:55:46 EST


On 08/22/2017 06:14 PM, kemi wrote:
> when performance is not important and when you want all tooling to work, you set:
>
> sysctl vm.strict_stats=1
>
> but if you can tolerate some possible tool breakage and some decreased
> counter precision, you can do:
>
> sysctl vm.strict_stats=0

My other thought was to try to set vm.strict_stats=0 and move to
vm.strict_stats=1 (and issue a printk) when somebody reads
/proc/zoneinfo (or the other files where the expensive stats are displayed).

We'd need three modes for the expensive stats:

1. Off by default
2. On. (#1 transforms to this by default when stats are read)
3. Off permanently. An *actual* tunable that someone could set
on systems that want to be able to read the stat files, don't
care about precision, and want the best performance.

That way, virtually everybody (who falls into mode #1 or #2) gets what
they want. The only folks who have to mess with a tunable are the
really weird, picky ones who use option #3.