linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: zhong jiang <zhongjiang@huawei.com>
Cc: iamjoonsoo.kim@lge.com, mgorman@techsingularity.net,
	minchan@kernel.org, vbabka@suse.cz, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RESEND] x86/numa: move setting parsed numa node to num_add_memblk
Date: Mon, 11 Dec 2017 14:45:39 +0100	[thread overview]
Message-ID: <20171211134539.GF4779@dhcp22.suse.cz> (raw)
In-Reply-To: <5A2E8131.4000104@huawei.com>

On Mon 11-12-17 20:59:29, zhong jiang wrote:
> On 2017/12/11 20:03, Michal Hocko wrote:
> > On Fri 01-12-17 18:13:52, zhong jiang wrote:
> >> The acpi table are very much like user input. it is likely to
> >> introduce some unreasonable node in some architecture. but
> >> they do not ingore the node and bail out in time. it will result
> >> in unnecessary print.
> >> e.g  x86:  start is equal to end is a unreasonable node.
> >> numa_blk_memblk will fails but return 0.
> >>
> >> meanwhile, Arm64 node will double set it to "numa_node_parsed"
> >> after NUMA adds a memblk successfully.  but X86 is not. because
> >> numa_add_memblk is not set in X86.
> > I am sorry but I still fail to understand wht the actual problem is.
> > You said that x86 will print a message. Alright at least you know that
> > the platform provides a nonsense ACPI/SRAT? tables and you can complain.
> > But does the kernel misbehave? In what way?
>   From the view of  the following code , we should expect that the node is reasonable.
>   otherwise, if we only want to complain,  it should bail out in time after printing the
>   unreasonable message.
> 
>           node_set(node, numa_nodes_parsed);
> 
>         pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s%s\n",
>                 node, pxm,
>                 (unsigned long long) start, (unsigned long long) end - 1,
>                 hotpluggable ? " hotplug" : "",
>                 ma->flags & ACPI_SRAT_MEM_NON_VOLATILE ? " non-volatile" : "");
> 
>         /* Mark hotplug range in memblock. */
>         if (hotpluggable && memblock_mark_hotplug(start, ma->length))
>                 pr_warn("SRAT: Failed to mark hotplug range [mem %#010Lx-%#010Lx] in memblock\n",
>                         (unsigned long long)start, (unsigned long long)end - 1);
> 
>         max_possible_pfn = max(max_possible_pfn, PFN_UP(end - 1));
> 
>         return 0;
> out_err_bad_srat:
>         bad_srat();
> 
>  In addition.  Arm64  will double set node to numa_nodes_parsed after add a memblk
> successfully.  Because numa_add_memblk will perform node_set(*, *).
> 
>          if (numa_add_memblk(node, start, end) < 0) {
>                 pr_err("SRAT: Failed to add memblk to node %u [mem %#010Lx-%#010Lx]\n",
>                        node, (unsigned long long) start,
>                        (unsigned long long) end - 1);
>                 goto out_err_bad_srat;
>         }
> 
>         node_set(node, numa_nodes_parsed);

I am sorry but I _do not_ understand how this answers my simple
question. You are describing the code flow which doesn't really explain
what is the _user_ or a _runtime_ visible effect. Anybody reading this
changelog will have to scratch his head to understand what the heck does
this fix and whether the patch needs to be considered for backporting.
See my point?
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2017-12-11 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 10:13 [RESEND] x86/numa: move setting parsed numa node to num_add_memblk zhong jiang
2017-12-11 12:03 ` Michal Hocko
2017-12-11 12:59   ` zhong jiang
2017-12-11 13:45     ` Michal Hocko [this message]
2017-12-12  6:52       ` zhong jiang

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=20171211134539.GF4779@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=minchan@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=zhongjiang@huawei.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).