All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Nick Piggin <npiggin@suse.de>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: [regression] cpuset,mm: update tasks' mems_allowed in time (58568d2)
Date: Wed, 24 Feb 2010 17:49:57 +0800	[thread overview]
Message-ID: <4B84F645.6030404@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1002230041240.12015@chino.kir.corp.google.com>

on 2010-2-23 16:44, David Rientjes wrote:
> On Tue, 23 Feb 2010, Miao Xie wrote:
> 
>> Sorry, Could you explain what you advised?
>> I think it is hard to fix this problem by adding a variant, because it is
>> hard to avoid loading a word of the mask before
>>
>> 	nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
>>
>> and then loading another word of the mask after
>>
>> 	tsk->mems_allowed = *newmems;
>>
>> unless we use lock.
>>
>> Maybe we need a rw-lock to protect task->mems_allowed.
>>
> 
> I meant that we need to define synchronization only for configurations 
> that do not do atomic nodemask_t stores, it's otherwise unnecessary.  
> We'll need to load and store tsk->mems_allowed via a helper function that 
> is defined to take the rwlock for such configs and only read/write the 
> nodemask for others.
> 

By investigating, we found that it is hard to guarantee the consistent between
mempolicy and mems_allowed because mempolicy was designed as a self-update function.
it just can be changed by one's self. Maybe we must change the implement of mempolicy.


WARNING: multiple messages have this Message-ID (diff)
From: Miao Xie <miaox@cn.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Nick Piggin <npiggin@suse.de>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: [regression] cpuset,mm: update tasks' mems_allowed in time (58568d2)
Date: Wed, 24 Feb 2010 17:49:57 +0800	[thread overview]
Message-ID: <4B84F645.6030404@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1002230041240.12015@chino.kir.corp.google.com>

on 2010-2-23 16:44, David Rientjes wrote:
> On Tue, 23 Feb 2010, Miao Xie wrote:
> 
>> Sorry, Could you explain what you advised?
>> I think it is hard to fix this problem by adding a variant, because it is
>> hard to avoid loading a word of the mask before
>>
>> 	nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
>>
>> and then loading another word of the mask after
>>
>> 	tsk->mems_allowed = *newmems;
>>
>> unless we use lock.
>>
>> Maybe we need a rw-lock to protect task->mems_allowed.
>>
> 
> I meant that we need to define synchronization only for configurations 
> that do not do atomic nodemask_t stores, it's otherwise unnecessary.  
> We'll need to load and store tsk->mems_allowed via a helper function that 
> is defined to take the rwlock for such configs and only read/write the 
> nodemask for others.
> 

By investigating, we found that it is hard to guarantee the consistent between
mempolicy and mems_allowed because mempolicy was designed as a self-update function.
it just can be changed by one's self. Maybe we must change the implement of mempolicy.

--
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-02-24  9:50 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 13:49 [regression] cpuset,mm: update tasks' mems_allowed in time (58568d2) Nick Piggin
2010-02-18 13:49 ` Nick Piggin
2010-02-18 21:38 ` David Rientjes
2010-02-18 21:38   ` David Rientjes
2010-02-19  3:31   ` Nick Piggin
2010-02-19  3:31     ` Nick Piggin
2010-02-19 10:06     ` David Rientjes
2010-02-19 10:06       ` David Rientjes
2010-02-22 11:53       ` Miao Xie
2010-02-22 11:53         ` Miao Xie
2010-02-22 12:06         ` Nick Piggin
2010-02-22 12:06           ` Nick Piggin
2010-02-23  1:48           ` Miao Xie
2010-02-23  1:48             ` Miao Xie
2010-02-22 22:06         ` David Rientjes
2010-02-22 22:06           ` David Rientjes
2010-02-23  7:32           ` Miao Xie
2010-02-23  7:32             ` Miao Xie
2010-02-23  8:55             ` David Rientjes
2010-02-23  8:55               ` David Rientjes
2010-02-23  9:23               ` Miao Xie
2010-02-23  9:23                 ` Miao Xie
2010-02-23 22:31                 ` David Rientjes
2010-02-23 22:31                   ` David Rientjes
2010-02-24  9:35                   ` Miao Xie
2010-02-24  9:35                     ` Miao Xie
2010-02-24 21:08                     ` David Rientjes
2010-02-24 21:08                       ` David Rientjes
2010-02-25  1:18                       ` Miao Xie
2010-02-25  1:18                         ` Miao Xie
2010-02-22 12:12       ` Nick Piggin
2010-02-22 12:12         ` Nick Piggin
2010-02-22 22:00         ` David Rientjes
2010-02-22 22:00           ` David Rientjes
2010-02-23  8:25           ` Miao Xie
2010-02-23  8:25             ` Miao Xie
2010-02-23  8:44             ` David Rientjes
2010-02-23  8:44               ` David Rientjes
2010-02-24  9:49               ` Miao Xie [this message]
2010-02-24  9:49                 ` Miao Xie
2010-02-24 21:06                 ` David Rientjes
2010-02-24 21:06                   ` David Rientjes
2010-02-19  7:51 ` KOSAKI Motohiro
2010-02-19  7:51   ` KOSAKI Motohiro
2010-02-19  9:42   ` David Rientjes
2010-02-19  9:42     ` David Rientjes
2010-02-19  7:56 ` KAMEZAWA Hiroyuki
2010-02-19  7:56   ` KAMEZAWA Hiroyuki

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=4B84F645.6030404@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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.