]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
acpi, numa: fix pxm to online numa node associations
authorDan Williams <dan.j.williams@intel.com>
Fri, 16 Mar 2018 02:49:14 +0000 (19:49 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 28 Mar 2018 19:05:59 +0000 (14:05 -0500)
commit9cb287f0d225cedc4ff3fdaab8de0d388bbfbcd3
tree7fb96f4e1aca119860ed53702848fe53b258a898
parent41ebed4913ee07514acf1bbc080b3712ea7efb7e
acpi, numa: fix pxm to online numa node associations

BugLink: http://bugs.launchpad.net/bugs/1759655
commit dc9e0a9347e932e3fd3cd03e7ff241022ed6ea8a upstream.

Commit 99759869faf1 "acpi: Add acpi_map_pxm_to_online_node()" added
support for mapping a given proximity to its nearest, by SLIT distance,
online node. However, it sometimes returns unexpected results due to the
fact that it switches from comparing the PXM node to the last node that
was closer than the current max.

    for_each_online_node(n) {
            dist = node_distance(node, n);
            if (dist < min_dist) {
                    min_dist = dist;
                    node = n; <---- from this point we're using the
      wrong node for node_distance()

Fixes: 99759869faf1 ("acpi: Add acpi_map_pxm_to_online_node()")
Cc: <stable@vger.kernel.org>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/acpi/numa.c