From: Andrew Morton <akpm@osdl.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zach Brown <zach.brown@oracle.com>,
Badari Pulavarty <pbadari@us.ibm.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Zachary Amsden <zach@vmware.com>,
Chris Wright <chrisw@sous-sol.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Jeff Dike <jdike@addtoit.com>, Linus Torvalds <torvalds@osdl.org>,
linux-arch@vger.kernel.org, linux-aio@kvack.org
Subject: Re: [PATCH RFC] use of activate_mm in fs/aio.c:use_mm()?
Date: Fri, 8 Dec 2006 15:45:22 -0800 [thread overview]
Message-ID: <20061208154522.a03bd90b.akpm@osdl.org> (raw)
In-Reply-To: <45777002.6050009@goop.org>
On Wed, 06 Dec 2006 17:36:02 -0800
Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Jeremy Fitzhardinge wrote:
> > I'm wondering if activate_mm() is the right thing to be using in
> > use_mm(); shouldn't this be switch_mm()?
> >
> > On normal x86, they're synonymous, but for the Xen patches I'm adding a
> > hook which assumes that activate_mm is only used the first time a new mm
> > is used after creation (I have another hook for dealing with dup_mm). I
> > think this use of activate_mm() is the only place where it could be used
> > a second time on an mm.
> >
> > From a quick look at the other architectures I think this is OK (most
> > simply implement one in terms of the other), but some are doing some
> > subtly different stuff between the two.
> >
> > Thanks,
> > J
> >
> >
> >
> Er, lets try that again:
>
> diff -r 455b71ed4525 fs/aio.c
> --- a/fs/aio.c Wed Dec 06 13:16:42 2006 -0800
> +++ b/fs/aio.c Wed Dec 06 17:17:43 2006 -0800
> @@ -588,7 +588,7 @@ static void use_mm(struct mm_struct *mm)
> * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise
> * it won't work. Update it accordingly if you change it here
> */
> - activate_mm(active_mm, mm);
> + switch_mm(active_mm, mm, tsk);
> task_unlock(tsk);
>
> mmdrop(active_mm);
That to me sounds like a reasonable description of the difference between
activate_mm() and switch_mm(). And the change appears reasonable as well.
But it is a change which the architecture maintainers would need to have a
think about, please.
next parent reply other threads:[~2006-12-08 23:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45776D54.7030409@goop.org>
[not found] ` <45777002.6050009@goop.org>
2006-12-08 23:45 ` Andrew Morton [this message]
2006-12-09 22:03 ` [PATCH RFC] use of activate_mm in fs/aio.c:use_mm()? David Miller
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=20061208154522.a03bd90b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=jdike@addtoit.com \
--cc=jeremy@goop.org \
--cc=linux-aio@kvack.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=pbadari@us.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@osdl.org \
--cc=zach.brown@oracle.com \
--cc=zach@vmware.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