All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Adam Litke <agl@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Ken Chen <kenchen@google.com>,
	Andy Whitcroft <apw@shadowen.org>
Subject: Re: [PATCH 3/3] [PATCH] hugetlb: Enforce quotas during reservation for shared mappings
Date: Wed, 24 Oct 2007 13:00:22 -0700	[thread overview]
Message-ID: <1193256022.4039.58.camel@localhost> (raw)
In-Reply-To: <1193255578.18417.63.camel@localhost.localdomain>

On Wed, 2007-10-24 at 14:52 -0500, Adam Litke wrote:
> 
> > Since alloc_huge_page() gets the VMA it could, in theory, be doing the
> > accounting.  The other user, hugetlb_cow(), seems to have a similar code
> > path.  But, it doesn't have to worry about shared_page, right?  We can
> > only have COWs on MAP_PRIVATE.
> > 
> > I'm just trying to find ways to future-proof the quotas since they
> > already got screwed up once.  The fewer call sites we have for them, the
> > fewer places they can get screwed up. :)
> 
> Yep.  Originally I wanted to put the hugetlb_get_quota() call inside
> alloc_huge_page() but the devil is in the details.  Failure to get quota
> needs to result in a SIGBUS whereas a standard allocation failure is
> OOM.  Because of this, we'd still need special handling of the
> alloc_huge_page() return value.  While that can be done easily enough, I
> didn't think it was worth it.  

Does it need special handling if we just use ERR_PTR()s?

-- Dave

--
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:00 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
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 [this message]

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=1193256022.4039.58.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.