linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Adam Litke <agl@us.ibm.com>
Cc: linux-mm@kvack.org, linux-kernel@kvack.org, kenchen@google.com,
	apw@shadowen.org, haveblue@us.ibm.com,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 2/5] hugetlb: Fix quota management for private mappings
Date: Tue, 30 Oct 2007 16:22:19 -0700	[thread overview]
Message-ID: <20071030162219.511394fb.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071030204615.16585.60817.stgit@kernel>

On Tue, 30 Oct 2007 13:46:15 -0700
Adam Litke <agl@us.ibm.com> wrote:

> 
> The hugetlbfs quota management system was never taught to handle
> MAP_PRIVATE mappings when that support was added.  Currently, quota is
> debited at page instantiation and credited at file truncation.  This
> approach works correctly for shared pages but is incomplete for private
> pages.  In addition to hugetlb_no_page(), private pages can be instantiated
> by hugetlb_cow(); but this function does not respect quotas.
> 
> Private huge pages are treated very much like normal, anonymous pages.
> They are not "backed" by the hugetlbfs file and are not stored in the
> mapping's radix tree.  This means that private pages are invisible to
> truncate_hugepages() so that function will not credit the quota.
> 
> This patch (based on a prototype provided by Ken Chen) moves quota
> crediting for all pages into free_huge_page().  page->private is used to
> store a pointer to the mapping to which this page belongs.  This is used to
> credit quota on the appropriate hugetlbfs instance.
> 

Consuming page.private on hugetlb pages is a noteworthy change.  I'm in
fact surprised that it's still available.

I'd expect that others (eg Christoph?) have designs upon it as well.  We
need to work out if this is the best use we can put it to.

--
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>

  reply	other threads:[~2007-10-30 23:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 20:45 [PATCH 0/5] hugetlb: Fix up filesystem quota accounting Adam Litke
2007-10-30 20:46 ` [PATCH 1/5] hugetlb: Split alloc_huge_page into private and shared components Adam Litke
2007-10-30 20:46 ` [PATCH 2/5] hugetlb: Fix quota management for private mappings Adam Litke
2007-10-30 23:22   ` Andrew Morton [this message]
2007-10-30 23:28     ` Christoph Lameter
2007-10-31 13:26       ` Adam Litke
2007-10-31 14:54       ` Adam Litke
2007-10-31 17:33         ` Christoph Lameter
2007-10-31 18:25           ` Dave Hansen
2007-10-31 18:42         ` Hugh Dickins
2007-10-30 20:46 ` [PATCH 3/5] hugetlb: Debit quota in alloc_huge_page Adam Litke
2007-10-30 20:46 ` [PATCH 4/5] hugetlb: Allow bulk updating in hugetlb_*_quota() Adam Litke
2007-10-30 20:46 ` [PATCH 5/5] hugetlb: Enforce quotas during reservation for shared mappings Adam Litke

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=20071030162219.511394fb.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=agl@us.ibm.com \
    --cc=apw@shadowen.org \
    --cc=clameter@sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=kenchen@google.com \
    --cc=linux-kernel@kvack.org \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).