public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Shawn Bohrer <shawn.bohrer@gmail.com>, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: HugePages_Rsvd leak
Date: Wed, 08 Apr 2015 14:16:05 -0700	[thread overview]
Message-ID: <55259A95.3030500@oracle.com> (raw)
In-Reply-To: <20150408161539.GA29546@sbohrermbp13-local.rgmadvisors.com>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2015-04-08 21:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 16:15 HugePages_Rsvd leak Shawn Bohrer
2015-04-08 19:29 ` Davidlohr Bueso
2015-04-08 20:19   ` Shawn Bohrer
2015-04-08 21:16 ` Mike Kravetz [this message]
2015-04-08 21:42   ` Shawn Bohrer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55259A95.3030500@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shawn.bohrer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox