mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"David Rientjes" <rientjes@google.com>,
	lee.schermerhorn@hp.com, miaox@cn.fujitsu.com, mingo@elte.hu,
	a.p.zijlstra@chello.nl, cl@linux-foundation.org,
	menage@google.com, nickpiggin@yahoo.com.au,
	y-goto@jp.fujitsu.com, penberg@cs.helsinki.fi,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] set_mempolicy(MPOL_INTERLEAV) cause kernel panic
Date: Sat, 25 Jul 2009 23:40:16 +0900 (JST)	[thread overview]
Message-ID: <f39a7fd56408054bebd11e40b7dd4db6.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <2f11576a0907250621w3696fdc0pe61638c8c935c981@mail.gmail.com>

KOSAKI Motohiro wrote:
> 2009/07/25 12:15 に KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com> さんは
> 書きました:
>> KAMEZAWA Hiroyuki wrote:
>>> KAMEZAWA Hiroyuki wrote:
>>> Then, here is a much easier fix. for trusting cpuset more.
>>>
>> just a memo about memory hotplug
>>
>> _Direct_ use of task->mems_allowed is only in cpuset and mempolicy.
>> If no policy is used, it's not checked.
>> (See alloc_pages_current())
>>
>> memory hotplug's notifier just updates top_cpuset's mems_allowed.
>> But it doesn't update each task's ones.
>> Then, task's bahavior is
>>
>>  - tasks which don't use mempolicy will use all nodes, N_HIGH_MEMORY.
>>  - tasks under cpuset will be controlled under their own cpuset.
>>  - tasks under mempolicy will use their own policy.
>>   but no new policy is re-calculated and, then, no new mask.
>>
>> Now, even if all memory on nodes a removed, pgdat just remains.
>> Then, cpuset/mempolicy will never access NODE_DATA(nid) which is NULL.
>
> Umm..
> I don't think this is optimal behavior. but if hotplug guys agree
> this, I agree this too.
>
This behavior itself is not very bad.
And all hotplug thing is just a side story of this bugfix.


To update nodemask,  user's mask should be saved in the policy
even when the mask is not relative and v.node should be calculated
again, at event. IIUC, rather than per-policy update by notifer,
some new implemenation for policy will be necessary.

If you mention about the fact that NODE_DATA(nid) is not removed
at node removal. I have no idea, now. copied zonelist is a problem.


Thanks,
-Kame




  reply	other threads:[~2009-07-25 14:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  9:48 KOSAKI Motohiro
2009-07-15 17:31 ` Lee Schermerhorn
2009-07-16  1:00   ` KOSAKI Motohiro
2009-07-16 20:05   ` David Rientjes
2009-07-17  0:04     ` KOSAKI Motohiro
2009-07-17  0:57       ` KAMEZAWA Hiroyuki
2009-07-17  2:07         ` KOSAKI Motohiro
2009-07-17  2:39           ` KAMEZAWA Hiroyuki
2009-07-17  9:09         ` David Rientjes
2009-07-17  9:01       ` David Rientjes
2009-07-24 22:51     ` David Rientjes
2009-07-24 23:09       ` Andrew Morton
2009-07-25  1:33         ` KAMEZAWA Hiroyuki
2009-07-25  2:35           ` KAMEZAWA Hiroyuki
2009-07-25  3:15             ` KAMEZAWA Hiroyuki
2009-07-25 13:21               ` KOSAKI Motohiro
2009-07-25 14:40                 ` KAMEZAWA Hiroyuki [this message]
2009-07-27 18:00                   ` David Rientjes
2009-07-27 17:55               ` David Rientjes
2009-07-27 23:58                 ` KAMEZAWA Hiroyuki
2009-07-28  0:14                   ` David Rientjes
2009-07-28  0:25                     ` KAMEZAWA Hiroyuki
2009-07-28  0:38                       ` David Rientjes
2009-07-28  0:54                         ` KAMEZAWA Hiroyuki
2009-07-28  1:02                           ` David Rientjes
2009-07-28  1:11                             ` KAMEZAWA Hiroyuki
2009-07-28  1:24                               ` KAMEZAWA Hiroyuki
2009-07-28  7:18 ` [BUGFIX] set_mempolicy(MPOL_INTERLEAV) N_HIGH_MEMORY aware KAMEZAWA Hiroyuki
2009-07-28  8:52   ` Andi Kleen
2009-07-28 10:04     ` KAMEZAWA Hiroyuki
2009-07-29 20:16   ` Andrew Morton
2009-07-30  0:06     ` 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=f39a7fd56408054bebd11e40b7dd4db6.squirrel@webmail-b.css.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --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=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.com \
    --cc=y-goto@jp.fujitsu.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

all inboxes | Powered by JetHome®