linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Larry Woodman <lwoodman@redhat.com>
Cc: Adam Litke <agl@us.ibm.com>, linux-mm@kvack.org
Subject: Re: [RFC] shared page table for hugetlbpage memory causing leak.
Date: Thu, 17 Jan 2008 17:42:05 +0530	[thread overview]
Message-ID: <20080117121205.GM11384@balbir.in.ibm.com> (raw)
In-Reply-To: <1200570818.18160.2.camel@dhcp83-56.boston.redhat.com>

* Larry Woodman <lwoodman@redhat.com> [2008-01-17 06:53:38]:

> On Thu, 2008-01-17 at 15:49 +0530, Balbir Singh wrote:
> > * Adam Litke <agl@us.ibm.com> [2008-01-16 12:54:28]:
> > 
> > > Since we know we are dealing with a hugetlb VMA, how about the
> > > following, simpler, _untested_ patch:
> > > 
> > > Signed-off-by: Adam Litke <agl@us.ibm.com>
> > > 
> > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > > index 6f97821..75b0e4f 100644
> > > --- a/mm/hugetlb.c
> > > +++ b/mm/hugetlb.c
> > > @@ -644,6 +644,11 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
> > >  		dst_pte = huge_pte_alloc(dst, addr);
> > >  		if (!dst_pte)
> > >  			goto nomem;
> > > +
> > > +		/* If page table is shared do not copy or take references */
> > > +		if (src_pte == dst_pte)
> > > +			continue;
> > > +
> > 
> > Shouldn't you be checking the PTE contents rather than the pointers?
> No, this is chacking for shared page tables not shared pages.

Aah.. I see.

Thanks for clarifying!

-- 
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

--
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>

      reply	other threads:[~2008-01-17 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 17:25 [RFC] shared page table for hugetlbpage memory causing leak Larry Woodman
2008-01-16 18:54 ` Adam Litke
2008-01-16 18:55   ` Larry Woodman
2008-01-17 10:19   ` Balbir Singh
2008-01-17 11:53     ` Larry Woodman
2008-01-17 12:12       ` Balbir Singh [this message]

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=20080117121205.GM11384@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=agl@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.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;
as well as URLs for NNTP newsgroup(s).