linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@digeo.com,
	hch@infradead.org
Subject: Re: Always passing mm and vma down (was: [RFC][PATCH] Convert do_no_page() to a hook to avoid DFS race)
Date: Sat, 31 May 2003 16:48:16 -0700	[thread overview]
Message-ID: <20030531234816.GB1408@us.ibm.com> (raw)
In-Reply-To: <20030531104617.J672@nightmaster.csn.tu-chemnitz.de>

On Sat, May 31, 2003 at 10:46:18AM +0200, Ingo Oeser wrote:
> On Fri, May 30, 2003 at 04:41:50PM -0700, Paul E. McKenney wrote:
> > -struct page *
> > -ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int no_share)
> > +int
> > +ia32_install_shared_page (struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access, pmd_t *pmd)
> 
> Why do we always pass mm and vma down, even if vma->vm_mm
> contains the mm, where the vma belongs to? Is the connection
> between a vma and its mm also protected by the mmap_sem?
> 
> Is this really necessary or an oversight and we waste a lot of
> stack in a lot of places?
> 
> If we just need it for accounting: We need current->mm, if we
> need it to locate the next vma relatively to this vma, vma->vm_mm
> is the one.

Interesting point.  The original do_no_page() API does this
as well:

	static int
	do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
		   unsigned long address, int write_access, pte_t *page_table, pmd_t *pmd)

As does do_anonymous_page().  I assumed that there were corner
cases where this one-to-one correspondence did not exist, but
must confess that I did not go looking for them.

Or is this a performance issue, avoiding a dereference and
possible cache miss?

					Thanx, Paul
--
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:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2003-05-31 23:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-30 23:41 [RFC][PATCH] Convert do_no_page() to a hook to avoid DFS race Paul E. McKenney
2003-05-31  1:00 ` Andrew Morton
2003-05-31 23:51   ` Paul E. McKenney
2003-08-09 18:50     ` Christoph Hellwig
2003-08-10 12:06       ` Paul E. McKenney
2003-06-01 19:33   ` Paul E. McKenney
2003-05-31  8:46 ` Always passing mm and vma down (was: [RFC][PATCH] Convert do_no_page() to a hook to avoid DFS race) Ingo Oeser
2003-05-31 23:48   ` Paul E. McKenney [this message]
2003-06-01 12:22     ` Andrea Arcangeli
2003-06-01 20:00       ` Paul E. McKenney
2003-06-02  8:32         ` Arjan van de Ven
2003-06-02 13:13           ` Paul E. McKenney
2003-06-04 10:38         ` Andrea Arcangeli
2003-06-07 16:29           ` Paul E. McKenney

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=20030531234816.GB1408@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=hch@infradead.org \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --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