lkml.org 
[lkml]   [2015]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: HugePages_Rsvd leak
On 04/08/2015 09:15 AM, Shawn Bohrer wrote:
> I've noticed on a number of my systems that after shutting down my
> application that uses huge pages that I'm left with some pages still
> in HugePages_Rsvd. It is possible that I still have something using
> huge pages that I'm not aware of but so far my attempts to find
> anything using huge pages have failed. I've run some simple tests
> using map_hugetlb.c from the kernel source and can see that pages that
> have been reserved but not allocated still show up in
> /proc/<pid>/smaps and /proc/<pid>/numa_maps. Are there any cases
> where this is not true?

Just a quick question. Are you using hugetlb filesystem(s)?

If so, you might want to take a look at files residing in the
filesystem(s). As an experiment, I had a program do a simple
mmap() of a file in a hugetlb filesystem. The program just
created the mapping, and did not actually fault/allocate any
huge pages. The result was the reservation (HugePages_Rsvd)
of sufficient huge pages to cover the mapping. When the program
exited, the reservations remained. If I remove (unlink) the
file the reservations will be removed.

--
Mike Kravetz


\
 
 \ /
  Last update: 2015-04-08 23:41    [W:0.057 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site