Thread (11 messages) 11 messages, 2 authors, 2020-09-25

Re: [PATCH v10 2/6] x86: Support Generic Initiator only proximity domains

From: Borislav Petkov <bp@alien8.de>
Date: 2020-09-25 16:08:29
Also in: linux-acpi, linux-arm-kernel, linux-mm, lkml

On Fri, Sep 25, 2020 at 12:32:26PM +0100, Jonathan Cameron wrote:
I don't think we can.  This is doing the same operation as
is done for memoryless cpu nodes in the init_cpu_to_node() call above
so it would make little sense from a code flow point of view, even if
it were possible.  However it isn't possible as far as I can see.

It is called after init_cpu_to_node() because...
* A GI node may also be a CPU node and / or a Memory Node, but we only
  have to do anything extra if it has neither of these.
  Easiest way to do that is use the same logic init_cpu_to_node() 
  does and rely on ordering wrt to the other two types of nodes that
  have already been handled.  We could have could just call it at the
  end of init_cpu_to_node() but I'd not be happy doing so without renaming
  that function and then we'd end up with a horrible name like
  init_cpu_to_node_and_gi() as they are rather different things.

It needs to happen before use is made of the node_data which is allocated
in init_gi_nodes() / init_memoryless_node() / alloc_node_data()
Let's put the gist of this requirement in the comment above
init_gi_nodes() for future reference.

...
It might be possible to allocate the zonelists for this special case later
in the boot flow, but it seems like we would be adding a lot of complexity
to avoid a single function call.
Nah, probably not worth the hassle.
How about this?

+/*
+ * A node may exist which has one or more Generic Initiators but no
+ * CPUs and no memory.
+ * When this function is called, any nodes containing either memory
+ * and/or CPUs will already be online and there is no need to do
+ * anything extra, even if they also contain one or more Generic
+ * Initiators.
+ */
Yes, along with the above gist.

Thx!

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help