Re: [PATCH] mm: khugepaged: fix NR_FILE_PAGES accounting in collapse_file()
From: Andrew Morton
Date: Thu Jan 29 2026 - 13:50:25 EST
On Thu, 29 Jan 2026 10:40:54 -0800 Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote:
> In META's fleet, we are seeing high level cgroups with zero file memcg
> stat but their descendants have non-zero file stat. This should not be
> possible. On further inspection by looking at kernel data structures
> though drgn, it was revealed that the high level cgroups have negative
> file stat which was aggregated from their children.
>
> Another interesting point was that this specific issue start happening
> more often as we started deploying thp-always more widely which
> indicates some correlation between file memory and THPs and indeed it
> was found that file memcg stat accounting is buggy in the collapse code
> path from the start.
So this has no known runtime effect apart from incorrect accounting?
> Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Should we cc:stable?