linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Adam Litke <agl@us.ibm.com>
To: Ken Chen <kenchen@google.com>
Cc: Dave Hansen <haveblue@us.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Andy Whitcroft <apw@shadowen.org>
Subject: Re: [PATCH 1/3] [FIX] hugetlb: Fix broken fs quota management
Date: Wed, 24 Oct 2007 15:02:04 -0500	[thread overview]
Message-ID: <1193256124.18417.70.camel@localhost.localdomain> (raw)
In-Reply-To: <b040c32a0710241221m9151f6xd0fe09e00608a597@mail.gmail.com>

On Wed, 2007-10-24 at 12:21 -0700, Ken Chen wrote:
> On 10/24/07, Adam Litke <agl@us.ibm.com> wrote:
> > On Wed, 2007-10-24 at 11:43 -0700, Dave Hansen wrote:
> > > This particular nugget is for MAP_PRIVATE pages only, right?  The shared
> > > ones should have another ref out on them for the 'mapping' too, so won't
> > > get released at unmap, right?
> >
> > Yep that's right.  Shared pages are released by truncate_hugepages()
> > when the ref for the mapping is dropped.
> 
> I think as a follow up patch, we should debit the quota in
> free_huge_page(), so you don't have to open code it like this and also
> consolidate calls to hugetlb_put_quota() in one place.  It's cleaner
> that way.

At free_huge_page() time, you can't associate the page with a struct
address_space so it becomes hard to credit the proper filesystem.  When
freeing the page, page->mapping is no longer valid (even for shared
pages). 

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

--
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-24 20:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 13:23 [PATCH 0/3] hugetlb: Fix up filesystem quota accounting Adam Litke
2007-10-24 13:23 ` [PATCH 1/3] [FIX] hugetlb: Fix broken fs quota management Adam Litke
2007-10-24 18:43   ` Dave Hansen
2007-10-24 19:03     ` Adam Litke
2007-10-24 19:18       ` Dave Hansen
2007-10-24 19:21       ` Ken Chen
2007-10-24 20:02         ` Adam Litke [this message]
2007-10-24 22:12           ` Dave Hansen
2007-10-25  5:20             ` Ken Chen
2007-10-25 14:54               ` Adam Litke
2007-10-24 13:23 ` [PATCH 2/3] hugetlb: Allow bulk updating in hugetlb_*_quota() Adam Litke
2007-10-24 13:24 ` [PATCH 3/3] [PATCH] hugetlb: Enforce quotas during reservation for shared mappings Adam Litke
2007-10-24 19:07   ` Dave Hansen
2007-10-24 19:52     ` Adam Litke
2007-10-24 20:00       ` 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=1193256124.18417.70.camel@localhost.localdomain \
    --to=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=haveblue@us.ibm.com \
    --cc=kenchen@google.com \
    --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).