From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: 'David Gibson' <david@gibson.dropbear.id.au>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
lse-tech@lists.sourceforge.net, raybry@sgi.com,
'Andy Whitcroft' <apw@shadowen.org>,
'Andrew Morton' <akpm@osdl.org>
Subject: RE: hugetlb demand paging patch part [2/3]
Date: Thu, 15 Apr 2004 17:27:58 +0000 [thread overview]
Message-ID: <200404151727.i3FHRwF08564@unix-os.sc.intel.com> (raw)
In-Reply-To: <20040415071728.GE25560@zax>
In-Reply-To: <200404132322.i3DNMuF21215@unix-os.sc.intel.com>
>>>> David Gibson wrote on Thursday, April 15, 2004 12:17 AM
> > diff -Nurp linux-2.6.5/mm/memory.c linux-2.6.5.htlb/mm/memory.c
> > +++ linux-2.6.5.htlb/mm/memory.c 2004-04-13 12:02:31.000000000 -0700
> > @@ -769,11 +769,6 @@ int get_user_pages(struct task_struct *t
> > if ((pages && vm_io) || !(flags & vma->vm_flags))
> > return i ? : -EFAULT;
> >
> > - if (is_vm_hugetlb_page(vma)) {
> > - i = follow_hugetlb_page(mm, vma, pages, vmas,
> > - &start, &len, i);
> > - continue;
> > - }
> > spin_lock(&mm->page_table_lock);
> > do {
> > struct page *map = NULL;
>
> Ok, I notice that you've removed the follow_hugtlb_page() function
> (and from the arch specific stuff, as well). As far as I can tell,
> this isn't actually related to demand-paging, in fact as far as I can
> tell this function is unnecessary
That was the reason I removed the function because it is no longer used
with demand paging.
> should already work for huge pages. In particular the path in
> get_user_pages() which can call handle_mm_fault() (which won't work on
> hugepages without your patch) should never get triggered, since
> hugepages are all prefaulted.
> Does that sound right? In other words, do you think the patch below,
> which just kills off follow_hugetlb_page() is safe, or have I missed
> something?
>
> Index: working-2.6/mm/memory.c
> =================================> --- working-2.6.orig/mm/memory.c 2004-04-13 11:42:42.000000000 +1000
> +++ working-2.6/mm/memory.c 2004-04-15 17:03:01.421905400 +1000
> @@ -766,16 +766,13 @@
> [snip]
> spin_lock(&mm->page_table_lock);
> do {
> struct page *map;
> int lookup_write = write;
> while (!(map = follow_page(mm, start, lookup_write))) {
> + /* hugepages should always be prefaulted */
> + BUG_ON(is_vm_hugetlb_page(vma));
> /*
> * Shortcut for anonymous pages. We don't want
> * to force the creation of pages tables for
This portion is incorrect, because it will trigger BUG_ON all the time
for faulting hugetlb page.
Yes, killing follow_hugetlb_page() is safe because follow_page() takes
care of hugetlb page. See 2nd patch posted earlier in
hugetlb_demanding_generic.patch
next prev parent reply other threads:[~2004-04-15 17:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 23:22 hugetlb demand paging patch part [2/3] Chen, Kenneth W
2004-04-15 7:17 ` David Gibson
2004-04-15 17:27 ` Chen, Kenneth W [this message]
2004-04-16 2:34 ` 'David Gibson'
2004-04-16 2:58 ` Chen, Kenneth W
2004-04-16 3:27 ` 'David Gibson'
2004-04-16 4:13 ` Chen, Kenneth W
2004-04-16 4:49 ` 'David Gibson'
2004-04-16 19:05 ` Ray Bryant
2004-04-17 12:05 ` 'David Gibson'
2004-04-18 17:36 ` [Lse-tech] " Ray Bryant
2004-04-19 0:47 ` 'David Gibson'
2004-04-16 5:56 ` Chen, Kenneth W
2004-04-16 6:15 ` 'David Gibson'
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=200404151727.i3FHRwF08564@unix-os.sc.intel.com \
--to=kenneth.w.chen@intel.com \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=david@gibson.dropbear.id.au \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=raybry@sgi.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