Whamcloud - gitweb
LU-9998 libcfs: split single NUMA node into partitions 45/29645/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Tue, 17 Oct 2017 09:02:35 +0000 (12:02 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Dec 2017 06:49:14 +0000 (06:49 +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

Change-Id: I7f9122931a88fd5770628d7ae21b764efc21c134
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/29645
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@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);
+                       }
                }
        }