From: Andrew Morton <akpm@osdl.org>
To: Adam Litke <agl@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 2/3 htlb-fault] Demand faulting for huge pages
Date: Wed, 28 Sep 2005 23:10:29 -0700 [thread overview]
Message-ID: <20050928231029.6dd60fc3.akpm@osdl.org> (raw)
In-Reply-To: <1127939538.26401.36.camel@localhost.localdomain>
Adam Litke <agl@us.ibm.com> wrote:
>
> +int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> + unsigned long address, int write_access)
> +{
> + pte_t *ptep;
> + int rc = VM_FAULT_MINOR;
> +
> + spin_lock(&mm->page_table_lock);
> +
> + ptep = huge_pte_alloc(mm, address);
> + if (!ptep) {
> + rc = VM_FAULT_SIGBUS;
> + goto out;
> + }
> + if (pte_none(*ptep))
> + rc = hugetlb_pte_fault(mm, vma, address, write_access);
> +out:
> + if (rc == VM_FAULT_MINOR)
> + flush_tlb_page(vma, address);
> +
> + spin_unlock(&mm->page_table_lock);
> + return rc;
> +}
label `out' can be moved down a couple of lines.
--
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:[~2005-09-29 6:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 20:25 [PATCH 0/3] " Adam Litke
2005-09-28 20:31 ` [PATCH 1/3 htlb-get_user_pages] " Adam Litke
2005-09-28 20:32 ` [PATCH 2/3 htlb-fault] " Adam Litke
2005-09-29 6:09 ` Andrew Morton
2005-09-29 6:10 ` Andrew Morton [this message]
2005-09-28 20:33 ` [PATCH 3/3 htlb-acct] " Adam Litke
2005-09-29 6:20 ` Andrew Morton
2005-09-29 9:45 ` Andi Kleen
2005-09-29 13:32 ` [PATCH 0/3] " Hugh Dickins
2005-10-06 15:22 ` 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=20050928231029.6dd60fc3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=agl@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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