linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
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: Wed, 12 May 2010 14:16:42 +0800	[thread overview]
Message-ID: <4BEA47CA.2020508@cn.fujitsu.com> (raw)
In-Reply-To: <20100511184900.8211b6f9.akpm@linux-foundation.org>

on 2010-5-12 9:49, Andrew Morton wrote:
...
>> --- a/kernel/exit.c
>> +++ b/kernel/exit.c
>> @@ -16,6 +16,7 @@
>>  #include <linux/key.h>
>>  #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.

> Also, why was the inclusion of cpuset.h added?  Nothing which this
> patch adds appears to need it?
> 

This is my mistake, I will make patch to cleanup it.

Thanks!
Miao 

--
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:15 UTC|newest]

Thread overview: 5+ 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-12  1:49 ` Andrew Morton
2010-05-12  6:16   ` Miao Xie [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

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=4BEA47CA.2020508@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=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=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 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).