From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: 'Mike Kravetz' <mike.kravetz@oracle.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
davidlohr@hp.com,
'Aneesh Kumar' <aneesh.kumar@linux.vnet.ibm.com>,
'Joonsoo Kim' <iamjoonsoo.kim@lge.com>
Subject: Re: [RFC 2/3] hugetlbfs: coordinate global and subpool reserve accounting
Date: Sat, 28 Feb 2015 11:25:24 +0800 [thread overview]
Message-ID: <013001d05306$31c8b250$955a16f0$@alibaba-inc.com> (raw)
> @@ -3444,10 +3445,14 @@ int hugetlb_reserve_pages(struct inode *inode,
> * Check enough hugepages are available for the reservation.
> * Hand the pages back to the subpool if there are not
> */
Better if comment is updated correspondingly.
Hillf
> - ret = hugetlb_acct_memory(h, chg);
> - if (ret < 0) {
> - hugepage_subpool_put_pages(spool, chg);
> - goto out_err;
> + if (subpool_reserved(spool))
> + ret = 0;
> + else {
> + ret = hugetlb_acct_memory(h, chg);
> + if (ret < 0) {
> + hugepage_subpool_put_pages(spool, chg);
> + goto out_err;
> + }
> }
>
--
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 reply other threads:[~2015-02-28 3:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-28 3:25 Hillf Danton [this message]
2015-02-28 17:25 ` Mike Kravetz
-- strict thread matches above, loose matches on Subject: below --
2015-02-27 22:58 [RFC 0/3] hugetlbfs: optionally reserve all fs pages at mount time Mike Kravetz
2015-02-27 22:58 ` [RFC 2/3] hugetlbfs: coordinate global and subpool reserve accounting Mike Kravetz
2015-03-02 23:10 ` Andrew Morton
2015-03-03 1:30 ` Mike Kravetz
2015-02-27 22:58 ` Mike Kravetz
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='013001d05306$31c8b250$955a16f0$@alibaba-inc.com' \
--to=hillf.zj@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=davidlohr@hp.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.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