[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97843013-7e06-449c-8418-3890657b2e26@redhat.com>
Date: Wed, 17 Jan 2024 15:15:36 +0100
From: David Hildenbrand <david@...hat.com>
To: Karim Manaouil <kmanaouil.dev@...il.com>, linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org
Subject: Re: Debug: mm: meminfo reports 222GiB of AnonPages but sum of RSS in
ps is barely 400MiB
On 17.01.24 12:39, Karim Manaouil wrote:
> Hi,
>
> My system says that 231GiB is used out of 251GiB, but when I try to find the
> processes using this memory in htop or ps, I find nothing. In fact, the sum
> of RSS memory across all processes listed in ps (both user and kernel process)
> is barely 400MiB.
Hi,
which kernel are you running? Which debug options are enabled in the config?
>
> A look at Meminfo shows that 222GiB of memory is AnonPages.
> With the help of `numastat -m`, it is inactive anonymous, more precisely.
>
> I am really baffled and I have no idea who is using my memory?!!
>
If it would only be "used", I would have suspected PCP lists. But if the
memory shows up as AnonPages in /proc/meminfo, that memory should
actually still be mapped into some MM.
> Here is what `free -h` is reporting.
>
> karim@...a:~/mem_debug$ free -h
> total used free shared buff/cache available
> Mem: 251Gi 231Gi 1.1Gi 52Mi 21Gi 20Gi
> Swap: 119Gi 75Gi 43Gi
>
> And this is meminfo:
>
> karim@...a:~/mem_debug$ grep AnonPages /proc/meminfo
> AnonPages: 222998596 kB
IIRC, the last one to drop mm->mm_users will call exit_mmap(), which
will unmap all pages (making AnonPages go down) and free the memory
(making used memory go down).
Maybe we have something call mmget(mm) but never mmput(mm)? Are you
running any OOT drivers or "special" hw?
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists