linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Suparna Bhattacharya <suparna@in.ibm.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-mm@kvack.org
Subject: Re: use_mm/unuse_mm correctness
Date: Mon, 16 Jun 2003 12:13:22 +0530	[thread overview]
Message-ID: <20030616121322.A10735@in.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0306160714360.1524-100000@localhost.localdomain>; from hugh@veritas.com on Mon, Jun 16, 2003 at 07:16:12AM +0100

get_cpu() would be the right thing to do - thanks for 
pointing that out.

However, in the aio case, use_mm and unuse_mm are called 
only by workqueue threads, so there shouldn't be any 
migration even if a pre-empt occurs (cpus_allowed is fixed 
to a particular cpu), should it ?

Regards
Suparna 

On Mon, Jun 16, 2003 at 07:16:12AM +0100, Hugh Dickins wrote:
> On Mon, 16 Jun 2003, Suparna Bhattacharya wrote:
> > Can anyone spot a problem in the following routines ?
> 
> If CONFIG_PREEMPT=y, then this might help:
> 
> --- 2.5.71-mm1/fs/aio.c	Sun Jun 15 12:36:09 2003
> +++ linux/fs/aio.c	Mon Jun 16 07:05:53 2003
> @@ -582,7 +582,8 @@ void unuse_mm(struct mm_struct *mm)
>  {
>  	current->mm = NULL;
>  	/* active_mm is still 'mm' */
> -	enter_lazy_tlb(mm, current, smp_processor_id());
> +	enter_lazy_tlb(mm, current, get_cpu());
> +	put_cpu();
>  }
>  
>  /*
> 

-- 
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Labs, India

--
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-06-16  6:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-16  3:59 Suparna Bhattacharya
2003-06-16  6:16 ` Hugh Dickins
2003-06-16  6:43   ` Suparna Bhattacharya [this message]
2003-06-16  9:30     ` Hugh Dickins
2003-06-17  0:06 Venu Vadapalli

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=20030616121322.A10735@in.ibm.com \
    --to=suparna@in.ibm.com \
    --cc=hugh@veritas.com \
    --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