From: Adam Litke <agl@us.ibm.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-mm@kvack.org, mel@csn.ul.ie, apw@shadowen.org,
nacc@linux.vnet.ibm.com, agl@linux.vnet.ibm.com
Subject: Re: [PATCH 1/3] hugetlb: Correct page count for surplus huge pages
Date: Mon, 25 Feb 2008 17:03:00 -0600 [thread overview]
Message-ID: <1203980580.3837.30.camel@localhost.localdomain> (raw)
In-Reply-To: <1203978363.11846.10.camel@nimitz.home.sr71.net>
On Mon, 2008-02-25 at 14:26 -0800, Dave Hansen wrote:
> Mon, 2008-02-25 at 14:01 -0800, Adam Litke wrote:
> >
> > spin_lock(&hugetlb_lock);
> > if (page) {
> > + /*
> > + * This page is now managed by the hugetlb allocator and has
> > + * no current users -- reset its reference count.
> > + */
> > + set_page_count(page, 0);
>
> So, they come out of the allocator and have a refcount of 1, and you
> want them to be consistent with the other huge pages that have a count
> of 0?
Yep all pages come out of the buddy allocator in this state. What is
different in this case is that we are choosing not to enqueue it into
the hugetlb pool right away since it might be immediately needed by the
caller.
> I'd feel a lot better about this if you did a __put_page() then a
> atomic_read() or equivalent to double-check what's going on. (I
> basically suggested the same thing to Jon Tollefson on the ginormous
> page stuff). It just forces the thing to be more consistent.
I could agree to this.
> It also seems a bit goofy to me to zero the refcount here, then reset it
> to one later on in update_and_free_page().
Yeah, it is a special case -- and commented accordingly. Do you have
any ideas how to avoid it without the wasted time of an
enqueue_huge_page()/dequeue_huge_page() cycle?
> I dunno. It just seems like every time something in here gets touched,
> three other things break. Makes me nervous. :(
Now c'mon, that's not fair. I'd expect that sort of statement from the
Hillary Clinton campaign, not you Dave :)
--
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>
next prev parent reply other threads:[~2008-02-25 22:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-25 22:01 [PATCH 0/3] hugetlb: Dynamic pool resize improvements Adam Litke
2008-02-25 22:01 ` [PATCH 1/3] hugetlb: Correct page count for surplus huge pages Adam Litke
2008-02-25 22:26 ` Dave Hansen
2008-02-25 23:03 ` Adam Litke [this message]
2008-02-25 23:11 ` Dave Hansen
2008-02-26 16:53 ` Adam Litke
2008-02-26 16:48 ` Dave Hansen
2008-02-25 22:01 ` [PATCH 2/3] hugetlb: Close a difficult to trigger reservation race Adam Litke
2008-02-25 22:01 ` [PATCH 3/3] hugetlb: Decrease hugetlb_lock cycling in gather_surplus_huge_pages Adam Litke
2008-02-25 22:31 ` Dave Hansen
2008-02-25 22:51 ` Adam Litke
-- strict thread matches above, loose matches on Subject: below --
2008-03-03 18:06 [PATCH 0/3] hugetlb: Dynamic pool resize improvements Adam Litke
2008-03-03 18:06 ` [PATCH 1/3] hugetlb: Correct page count for surplus huge pages 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=1203980580.3837.30.camel@localhost.localdomain \
--to=agl@us.ibm.com \
--cc=agl@linux.vnet.ibm.com \
--cc=apw@shadowen.org \
--cc=haveblue@us.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=nacc@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).