Whamcloud - gitweb
LU-9998 libcfs: split single NUMA node into partitions 90/30690/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Tue, 17 Oct 2017 09:02:35 +0000 (12:02 +0300)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 9 Feb 2018 16:57:43 +0000 (16:57 +0000)
For machines with single NUMA node change default behavior
and slpit it with cpu_npartitions as it was before 2.8.59.
See LU-5050 libcfs: default CPT matches NUMA topology

Lustre-change: https://review.whamcloud.com/29645
Lustre-commit: c9d14a01263bd0fb7a5fac853b5e2d34ff8cadab

Change-Id: I7f9122931a88fd5770628d7ae21b764efc21c134
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30690
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
libcfs/libcfs/linux/linux-cpu.c

index 59e9986..b7d6193 100644 (file)
@@ -902,6 +902,10 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(const char *pattern)
                                if (!cpumask_empty(cpumask_of_node(i)))
                                        ncpt++;
                        }
+                       if (ncpt == 1) { /* single NUMA node */
+                               kfree(pattern_dup);
+                               return cfs_cpt_table_create(cpu_npartitions);
+                       }
                }
        }