From: Adam Litke <agl@us.ibm.com>
To: "Zhang, Yanmin" <yanmin.zhang@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: RE: [PATCH 2/3 htlb-fault] Demand faulting for hugetlb
Date: Wed, 07 Sep 2005 09:04:00 -0500 [thread overview]
Message-ID: <1126101840.3123.74.camel@localhost.localdomain> (raw)
In-Reply-To: <8126E4F969BA254AB43EA03C59F44E8403365201@pdsmsx404>
On Wed, 2005-09-07 at 10:33 +0800, Zhang, Yanmin wrote:
> >>-----Original Message-----
> >>From: linux-kernel-owner@vger.kernel.org
> >>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Adam Litke
> >>Sent: Wednesday, September 07, 2005 5:59 AM
> >>To: linux-kernel@vger.kernel.org
> >>Cc: ADAM G. LITKE [imap]
> >>Subject: Re: [PATCH 2/3 htlb-fault] Demand faulting for hugetlb
>
> >>+retry:
> >>+ page = find_get_page(mapping, idx);
> >>+ if (!page) {
> >>+ /* charge the fs quota first */
> >>+ if (hugetlb_get_quota(mapping)) {
> >>+ ret = VM_FAULT_SIGBUS;
> >>+ goto out;
> >>+ }
> >>+ page = alloc_huge_page();
> >>+ if (!page) {
> >>+ hugetlb_put_quota(mapping);
> >>+ ret = VM_FAULT_SIGBUS;
> >>+ goto out;
> >>+ }
> >>+ if (add_to_page_cache(page, mapping, idx, GFP_ATOMIC)) {
>
> Here you lost hugetlb_put_quota(mapping);
Whoops, thanks for catching that.
> >>+ put_page(page);
> >>+ goto retry;
> >>+ }
> >>+ unlock_page(page);
>
> As for regular pages, kernel is used to unlock mm-> page_table_lock
> before find_get_page and relock it before setting pte. Why isn't the
> style followed by huge page fault?
As far as I can tell, we should be able to do that for large pages as
well. I'll give it a spin.
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
next prev parent reply other threads:[~2005-09-07 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 2:33 [PATCH 2/3 htlb-fault] Demand faulting for hugetlb Zhang, Yanmin
2005-09-07 14:04 ` Adam Litke [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-09-08 21:15 [UPDATE] [PATCH 0/3] " Adam Litke
2005-09-08 21:20 ` [PATCH 2/3 htlb-fault] " Adam Litke
2005-09-07 3:13 Zhang, Yanmin
2005-09-06 21:53 [PATCH 0/3] " Adam Litke
2005-09-06 21:58 ` [PATCH 2/3 htlb-fault] " 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=1126101840.3123.74.camel@localhost.localdomain \
--to=agl@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yanmin.zhang@intel.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