public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Litke <agl@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-mm@kvack.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Hugetlb demotion for x86
Date: Wed, 10 May 2006 16:45:35 -0500	[thread overview]
Message-ID: <1147297535.24029.114.camel@localhost.localdomain> (raw)
In-Reply-To: <20060510204928.GA31315@infradead.org>

On Wed, 2006-05-10 at 21:49 +0100, Christoph Hellwig wrote:
> On Wed, May 10, 2006 at 03:32:36PM -0500, Adam Litke wrote:
> > By smart fallback do you mean we should convert the hugetlb fault code
> > back to using VM_FAULT_SIGBUS and writing userspace sighandlers to do
> > the same thing I am, but in userspace?  FWIW I did implement that in
> > libhugetlbfs to try it out, but that seems much dirtier to me than
> > handling faults in the kernel.
> 
> Umm, why do these faults happen at all?  When all the hugetlb code went
> in it we allocated at mmap time.  Later it was converted to demand faulting
> but under the premise that we keep the strict overcommit accounting.  When
> did that part go away aswell?  With strict overcommit handling for huge
> pages no fault should happen when the pool is exausted.

Strict overcommit is there for shared mappings.  When private mapping
support was added, people agreed that full overcommit should apply to
private mappings for the same reasons normal page overcommit is desired.
For one: an application using lots of private huge pages should not be
prohibited from forking if it's likely to just exec a small helper
program.

"These faults" are happening in two cases when MAP_PRIVATE huge pages
are being used:
1) Fault on an uninstantiated huge page: This can happen when numerous
users of huge pages in the system are competing for a finite number of
huge pages.  Even if the process checks for free huge pages before
mmaping the area, another process is free to "steal" those pages out
from under the careful process.

2) COW fault on an instantiated huge page:  Happens in child processes
who inherit a private hugetlb region and write to it.

Both of these cases are non-deterministic and should be handled in some
way.  Just killing the process doesn't seem like a permanent solution to
me.

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center


  reply	other threads:[~2006-05-10 21:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 18:56 [RFC] Hugetlb demotion for x86 Adam Litke
2006-05-10 19:46 ` Dave Hansen
2006-05-10 19:49 ` Dave Hansen
2006-05-10 20:05 ` Christoph Hellwig
2006-05-10 20:32   ` Adam Litke
2006-05-10 20:49     ` Christoph Hellwig
2006-05-10 21:45       ` Adam Litke [this message]
2006-05-11 15:15         ` Hugh Dickins
2006-05-11 15:33           ` Alan Cox
2006-05-11 15:59           ` Adam Litke
2006-05-10 21:38 ` Andi Kleen
2006-05-10 23:42 ` Christoph Lameter
2006-05-11 16:10   ` Adam Litke
2006-05-15 14:20     ` Dave Hansen

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=1147297535.24029.114.camel@localhost.localdomain \
    --to=agl@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.kernel.org \
    /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