All of lore.kernel.org
 help / color / mirror / Atom feed
From: "'David Gibson'" <david@gibson.dropbear.id.au>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
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 [3/3]
Date: Fri, 16 Apr 2004 01:40:45 +0000	[thread overview]
Message-ID: <20040416014045.GE12735@zax> (raw)
In-Reply-To: <200404151716.i3FHGjF08464@unix-os.sc.intel.com>

On Thu, Apr 15, 2004 at 10:16:45AM -0700, Chen, Kenneth W wrote:
> >>>>> David Gibson wrote on Thursday, April 15, 2004 12:26 AM
> >
> > > @@ -175,7 +132,6 @@ struct page *follow_huge_addr(struct mm_
> > >  		return NULL;
> > >  	page = pte_page(*ptep);
> > >  	page += ((addr & ~HPAGE_MASK) >> PAGE_SHIFT);
> > > -	get_page(page);
> > >  	return page;
> > >  }
> >
> > As far as I can tell, the removal of these get_page()s is also
> > unrelated to the demand paging per se.  But afaict removing them is
> > correct - the corresponding logic in follow_page() for normal pages
> > doesn't appear to do a get_page(), nor do all archs do a get_page().
> >
> > Does that sound right to you?
> 
> It's a bug in the code that was never exercised with prefaulting.  See
> get_user_pages() that short circuits the rest of faulting code with
> is_vm_hugetlb_page() test.

Erm.. it's not clear to me that it could never be exercise:
get_user_pages() is not the only caller of follow_page().

> > If so, the patch below ought to be safe (and indeed a bugfix) to
> > apply now:
> 
> Yep, that's correct, I already did x86 and ia64 in one of the three
> patches posted. ;-)

Yes, I know, but I'm trying to separate which parts of your patches
are fixes/cleanups for pre-existing problems, and which are genuinely
new for demand paging.

-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

WARNING: multiple messages have this Message-ID (diff)
From: "'David Gibson'" <david@gibson.dropbear.id.au>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
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 [3/3]
Date: Fri, 16 Apr 2004 11:40:45 +1000	[thread overview]
Message-ID: <20040416014045.GE12735@zax> (raw)
In-Reply-To: <200404151716.i3FHGjF08464@unix-os.sc.intel.com>

On Thu, Apr 15, 2004 at 10:16:45AM -0700, Chen, Kenneth W wrote:
> >>>>> David Gibson wrote on Thursday, April 15, 2004 12:26 AM
> >
> > > @@ -175,7 +132,6 @@ struct page *follow_huge_addr(struct mm_
> > >  		return NULL;
> > >  	page = pte_page(*ptep);
> > >  	page += ((addr & ~HPAGE_MASK) >> PAGE_SHIFT);
> > > -	get_page(page);
> > >  	return page;
> > >  }
> >
> > As far as I can tell, the removal of these get_page()s is also
> > unrelated to the demand paging per se.  But afaict removing them is
> > correct - the corresponding logic in follow_page() for normal pages
> > doesn't appear to do a get_page(), nor do all archs do a get_page().
> >
> > Does that sound right to you?
> 
> It's a bug in the code that was never exercised with prefaulting.  See
> get_user_pages() that short circuits the rest of faulting code with
> is_vm_hugetlb_page() test.

Erm.. it's not clear to me that it could never be exercise:
get_user_pages() is not the only caller of follow_page().

> > If so, the patch below ought to be safe (and indeed a bugfix) to
> > apply now:
> 
> Yep, that's correct, I already did x86 and ia64 in one of the three
> patches posted. ;-)

Yes, I know, but I'm trying to separate which parts of your patches
are fixes/cleanups for pre-existing problems, and which are genuinely
new for demand paging.

-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

  reply	other threads:[~2004-04-16  1:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13 23:25 hugetlb demand paging patch part [3/3] Chen, Kenneth W
2004-04-13 23:25 ` Chen, Kenneth W
2004-04-15  7:25 ` David Gibson
2004-04-15  7:25   ` David Gibson
2004-04-15 17:16 ` Chen, Kenneth W
2004-04-15 17:16   ` Chen, Kenneth W
2004-04-16  1:40   ` 'David Gibson' [this message]
2004-04-16  1:40     ` 'David Gibson'
2004-04-16  2:49 ` Chen, Kenneth W
2004-04-16  2:49   ` Chen, Kenneth W

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=20040416014045.GE12735@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=kenneth.w.chen@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.