[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables





On 25/04/17 15:54, Vijay Kilari wrote:
On Tue, Apr 25, 2017 at 5:58 PM, Julien Grall <julien.grall@xxxxxxx> wrote:

By setting 1, we are enabling acpi_numa by default. If not enabled, the
below
call has check srat_disabled() before proceeding fails.



My understanding is on x86 acpi_numa is disabled by default and will be
enabled if they are able to parse the SRAT. So why are you changing the
behavior for x86?


acpi_numa = 0 means it is enabled by default on x86.


In acpi_scan_nodes:

if (acpi_numa <= 0)
  return -1;

So it does not seem that 0 means enabled.

IMO, In x86
         -1 means disabled
          0 enabled but not numa initialized
          1 enabled and numa initialized.

I clubbed 0 & 1.

From your description 0 and 1 have different meaning, so I don't see how you can merge them that easily without any explanation.

Anyway, I will leave x86 maintainers give their opinion here.


I was referring to below code in x86 where in acpi_numa = 0 means
srat_disabled() returns false. Which means acpi_numa is enabled implicitly.

int srat_disabled(void)
{
      return numa_off || acpi_numa < 0;
}

When I changed acpi_numa to bool, it is initialized to 1 and changed
below code.

bool srat_disabled(void)
{
    return numa_off || acpi_numa == 0;
}

Also this srat_disabed() is used in acpi_numa_memory_affinity_init which is
called from acpi_numa_init() before calling acpi_scan_nodes().



--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.