Re: Debug: mm: meminfo reports 222GiB of AnonPages but sum of RSS in ps is barely 400MiB

From: Karim Manaouil
Date: Wed Jan 17 2024 - 10:50:59 EST


On Wed, Jan 17, 2024 at 2:15 PM David Hildenbrand <david@xxxxxxxxxx> wrote:

> Maybe we have something call mmget(mm) but never mmput(mm)? Are you
> running any OOT drivers or "special" hw?

That's exactly the reason! I was writing some code to count the number
of empty page tables in the system
at any given point in time. I called get_task_mm(), but I forgot to
call mmput() after that, and thus
the memory was never released.

I should have double checked, but thanks to your remark I immediately
recognised the issue and fixed it
(maybe I should have posted the code as well and mentioned that in my
original email).

--
Cheer
Karim