Re: [PATCH v2 1/2] mm: memcg: refactor page state unit helpers

From: Michal Koutný
Date: Thu Oct 05 2023 - 10:17:31 EST


On Wed, Oct 04, 2023 at 02:36:19PM -0400, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> Yes, it's because of node resolution which event counters generally
> don't have. Some of the refault events influence node-local reclaim
> decisions, see mm/vmscan.c::snapshot_refaults().
>
> There are a few other event counters in the stat array that people
> thought would be useful to have split out in
> /sys/devices/system/node/nodeN/vmstat to understand numa behavior
> better.
>
> It's a bit messy.
>
> Some events would be useful to move to 'stats' for the numa awareness,
> such as the allocator stats and reclaim activity.
>
> Some events would be useful to move to 'stats' for the numa awareness,
> but don't have the zone resolution required by them, such as
> kswapd/kcompactd wakeups.

Thanks for the enlightenment.

> Some events aren't numa specific, such as oom kills, drop_pagecache.

These are oddballs indeed. As with the normalization patchset these are
counted as PAGE_SIZE^W 1 error but they should rather be an infinite
error (to warrant a flush).

So my feedback to this series is:
- patch 1/2 -- creating two classes of units is consequence of unclarity
between state and events (as in event=Δstate/Δt) and resolution
(global vs per-node), so the better approach would be to tidy this up,
- patch 2/2 -- it could use the single unit class that exists,
it'll bound the error of printed numbers afterall (and can be changed
later depending on how it affects internal consumers).

My 0.02€,
Michal

Attachment: signature.asc
Description: PGP signature