Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690140

Re: [PATCH V3 1/3] x86/numa_emulation: refine the calculation of max_emu_nid and dfl_phys_nid

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH V3 1/3] x86/numa_emulation: refine the calculation of max_emu_nid and dfl_phys_nid
Date 2017-07-18 13:10 +0200
Message-ID <u4yya-1Ez-147@gated-at.bofh.it> (permalink)
References <u0MSZ-3ZJ-1@gated-at.bofh.it> <u0MT0-3ZJ-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jul 08, 2017 at 09:30:57AM +0800, Wei Yang wrote:
> max_emu_nid and dfl_phys_nid is calculated from emu_nid_to_phys[], which is
> calculated in split_nodes_xxx_interleave(). From the logic in these

$ git grep split_nodes_xxx_interleave
$

> functions, it is assured the emu_nid_to_phys[] has meaningful value if it
> return successfully and ensures dfl_phys_nid will get a valid value.
> 
> This patch removes the error branch to check invalid dfl_phys_nid and

So the check doesn't hurt anyone.

On the contrary - it is an "assertion" of sorts in otherwise complex
code and actually documents the fact that by then emu_nid_to_phys[]
needs to be setup properly.

And it is especially useful if someone decides to change that code in
the future, for whatever reason, and gets to hit that check - it'll even
be helpful in that case.

So I'd vote for keeping that check and not doing anything.

While we're at it, never say "this patch" in a commit message - that is
tautologically obvious.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 0/3] Refine numa_emulation Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200
  [PATCH V3 2/3] x86/numa_emulation: assign physnode_mask directly from numa_nodes_parsed Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200
    [tip:x86/debug] x86/numa_emulation: Assign physnode_mask directly  from numa_nodes_parsed tip-bot for Wei Yang <tipbot@zytor.com> - 2017-07-18 13:00 +0200
  [PATCH V3 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200
    [tip:x86/debug] x86/numa_emulation: Recalculate numa_nodes_parsed  from emulated nodes tip-bot for Wei Yang <tipbot@zytor.com> - 2017-07-18 13:00 +0200
  [PATCH V3 1/3] x86/numa_emulation: refine the calculation of max_emu_nid and dfl_phys_nid Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200
    [tip:x86/debug] x86/numa_emulation: Refine the calculation of  max_emu_nid and dfl_phys_nid tip-bot for Wei Yang <tipbot@zytor.com> - 2017-07-18 13:00 +0200
    Re: [PATCH V3 1/3] x86/numa_emulation: refine the calculation of  max_emu_nid and dfl_phys_nid Borislav Petkov <bp@alien8.de> - 2017-07-18 13:10 +0200
      Re: [PATCH V3 1/3] x86/numa_emulation: refine the calculation of  max_emu_nid and dfl_phys_nid Wei Yang <richard.weiyang@gmail.com> - 2017-07-26 05:20 +0200

csiph-web