From: Michal Hocko <mhocko@kernel.org>
To: Pingfan Liu <kernelfans@gmail.com>
Cc: Qian Cai <cai@lca.pw>, Andrew Morton <akpm@linux-foundation.org>,
Barret Rhoden <brho@google.com>,
Dave Hansen <dave.hansen@intel.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Ingo Molnar <mingo@elte.hu>, Oscar Salvador <osalvador@suse.de>,
Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next v2] mm/hotplug: fix a null-ptr-deref during NUMA boot
Date: Fri, 31 May 2019 11:03:07 +0200 [thread overview]
Message-ID: <20190531090307.GL6896@dhcp22.suse.cz> (raw)
In-Reply-To: <CAFgQCTtD5OYuDwRx1uE7R9N+qYf5k_e=OxajpPWZWb70+QgBvg@mail.gmail.com>
On Thu 30-05-19 20:55:32, Pingfan Liu wrote:
> On Wed, May 29, 2019 at 2:20 AM Michal Hocko <mhocko@kernel.org> wrote:
> >
> > [Sorry for a late reply]
> >
> > On Thu 23-05-19 11:58:45, Pingfan Liu wrote:
> > > On Wed, May 22, 2019 at 7:16 PM Michal Hocko <mhocko@kernel.org> wrote:
> > > >
> > > > On Wed 22-05-19 15:12:16, Pingfan Liu wrote:
> > [...]
> > > > > But in fact, we already have for_each_node_state(nid, N_MEMORY) to
> > > > > cover this purpose.
> > > >
> > > > I do not really think we want to spread N_MEMORY outside of the core MM.
> > > > It is quite confusing IMHO.
> > > > .
> > > But it has already like this. Just git grep N_MEMORY.
> >
> > I might be wrong but I suspect a closer review would reveal that the use
> > will be inconsistent or dubious so following the existing users is not
> > the best approach.
> >
> > > > > Furthermore, changing the definition of online may
> > > > > break something in the scheduler, e.g. in task_numa_migrate(), where
> > > > > it calls for_each_online_node.
> > > >
> > > > Could you be more specific please? Why should numa balancing consider
> > > > nodes without any memory?
> > > >
> > > As my understanding, the destination cpu can be on a memory less node.
> > > BTW, there are several functions in the scheduler facing the same
> > > scenario, task_numa_migrate() is an example.
> >
> > Even if the destination node is memoryless then any migration would fail
> > because there is no memory. Anyway I still do not see how using online
> > node would break anything.
> >
> Suppose we have nodes A, B,C, where C is memory less but has little
> distance to B, comparing with the one from A to B. Then if a task is
> running on A, but prefer to run on B due to memory footprint.
> task_numa_migrate() allows us to migrate the task to node C. Changing
> for_each_online_node will break this.
That would require the task to have preferred node to be C no? Or do I
missunderstand the task migration logic?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-05-31 9:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 5:48 [PATCH -next v2] mm/hotplug: fix a null-ptr-deref during NUMA boot Qian Cai
2019-05-13 12:41 ` Michal Hocko
2019-05-13 13:43 ` Qian Cai
2019-05-13 14:04 ` Michal Hocko
2019-05-13 15:20 ` Qian Cai
2019-05-13 15:31 ` Michal Hocko
2019-05-22 7:12 ` Pingfan Liu
2019-05-22 11:16 ` Michal Hocko
2019-05-23 3:58 ` Pingfan Liu
2019-05-23 4:00 ` Pingfan Liu
2019-05-28 18:21 ` Michal Hocko
2019-05-30 13:01 ` Pingfan Liu
2019-05-28 18:20 ` Michal Hocko
2019-05-30 12:55 ` Pingfan Liu
2019-05-31 9:03 ` Michal Hocko [this message]
2019-06-03 4:17 ` Pingfan Liu
2019-06-21 13:17 ` Qian Cai
2019-06-21 13:55 ` Michal Hocko
2019-06-24 8:42 ` Pingfan Liu
2019-06-26 13:57 ` Michal Hocko
2019-06-27 3:11 ` Pingfan Liu
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=20190531090307.GL6896@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=brho@google.com \
--cc=cai@lca.pw \
--cc=dave.hansen@intel.com \
--cc=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mingo@elte.hu \
--cc=mpe@ellerman.id.au \
--cc=osalvador@suse.de \
--cc=peterz@infradead.org \
--cc=rppt@linux.ibm.com \
--cc=tglx@linutronix.de \
/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.