All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: miaox@cn.fujitsu.com
Cc: David Rientjes <rientjes@google.com>,
	Nick Piggin <npiggin@suse.de>, Paul Menage <menage@google.com>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH 2/2] cpuset,mm: fix no node to alloc memory when changing cpuset's mems
Date: Tue, 11 May 2010 23:22:15 -0400	[thread overview]
Message-ID: <20100511232215.4c8b4318.akpm@linux-foundation.org> (raw)
In-Reply-To: <4BEA47CA.2020508@cn.fujitsu.com>

On Wed, 12 May 2010 14:16:42 +0800 Miao Xie <miaox@cn.fujitsu.com> wrote:

> >>  #include <linux/security.h>
> >>  #include <linux/cpu.h>
> >> +#include <linux/cpuset.h>
> >>  #include <linux/acct.h>
> >>  #include <linux/tsacct_kern.h>
> >>  #include <linux/file.h>
> >> @@ -1003,8 +1004,10 @@ NORET_TYPE void do_exit(long code)
> >>  
> >>  	exit_notify(tsk, group_dead);
> >>  #ifdef CONFIG_NUMA
> >> +	task_lock(tsk);
> >>  	mpol_put(tsk->mempolicy);
> >>  	tsk->mempolicy = NULL;
> >> +	task_unlock(tsk);
> >>  #endif
> >>  #ifdef CONFIG_FUTEX
> >>  	if (unlikely(current->pi_state_cache))
> > 
> > Given that this function is already holding task_lock(tsk), this
> > didn't work very well.
> 
> Sorry for replying late.
> 
> Thanks for your patch that removes task_lock(tsk).
> 
> I made this patch against the mainline tree, and do_exit() in the mainline tree
> doesn't hold task_lock(tsk), so I took task_lock(tsk). But I didn't take notice
> that do_exit() in the mmotm tree had been changed, and I made this mistake.

Ah, hang on.  Yes, I had to manually fix that a lot of times.  The code
you were patching has moved from do_exit() over to exit_mm().  AFACIT
my change is still OK though.  Please carefully review latest -mm?



WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: miaox@cn.fujitsu.com
Cc: David Rientjes <rientjes@google.com>,
	Nick Piggin <npiggin@suse.de>, Paul Menage <menage@google.com>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH 2/2] cpuset,mm: fix no node to alloc memory when changing cpuset's mems
Date: Tue, 11 May 2010 23:22:15 -0400	[thread overview]
Message-ID: <20100511232215.4c8b4318.akpm@linux-foundation.org> (raw)
In-Reply-To: <4BEA47CA.2020508@cn.fujitsu.com>

On Wed, 12 May 2010 14:16:42 +0800 Miao Xie <miaox@cn.fujitsu.com> wrote:

> >>  #include <linux/security.h>
> >>  #include <linux/cpu.h>
> >> +#include <linux/cpuset.h>
> >>  #include <linux/acct.h>
> >>  #include <linux/tsacct_kern.h>
> >>  #include <linux/file.h>
> >> @@ -1003,8 +1004,10 @@ NORET_TYPE void do_exit(long code)
> >>  
> >>  	exit_notify(tsk, group_dead);
> >>  #ifdef CONFIG_NUMA
> >> +	task_lock(tsk);
> >>  	mpol_put(tsk->mempolicy);
> >>  	tsk->mempolicy = NULL;
> >> +	task_unlock(tsk);
> >>  #endif
> >>  #ifdef CONFIG_FUTEX
> >>  	if (unlikely(current->pi_state_cache))
> > 
> > Given that this function is already holding task_lock(tsk), this
> > didn't work very well.
> 
> Sorry for replying late.
> 
> Thanks for your patch that removes task_lock(tsk).
> 
> I made this patch against the mainline tree, and do_exit() in the mainline tree
> doesn't hold task_lock(tsk), so I took task_lock(tsk). But I didn't take notice
> that do_exit() in the mmotm tree had been changed, and I made this mistake.

Ah, hang on.  Yes, I had to manually fix that a lot of times.  The code
you were patching has moved from do_exit() over to exit_mm().  AFACIT
my change is still OK though.  Please carefully review latest -mm?


--
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:[~2010-05-12  6:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 10:54 [PATCH 2/2] cpuset,mm: fix no node to alloc memory when changing cpuset's mems Miao Xie
2010-05-04 10:54 ` Miao Xie
2010-05-12  1:49 ` Andrew Morton
2010-05-12  1:49   ` Andrew Morton
2010-05-12  6:16   ` Miao Xie
2010-05-12  6:16     ` Miao Xie
2010-05-12  3:22     ` Andrew Morton [this message]
2010-05-12  3:22       ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2010-04-22 14:12 Miao Xie
2010-04-22 14:12 ` Miao Xie

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=20100511232215.4c8b4318.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=menage@google.com \
    --cc=miaox@cn.fujitsu.com \
    --cc=npiggin@suse.de \
    --cc=rientjes@google.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.