From f8736cdfe48ca70a6d293d55ad184dc6b34af312 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Tue, 17 Oct 2017 12:02:35 +0300 Subject: [PATCH] LU-9998 libcfs: split single NUMA node into partitions 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 Reviewed-by: Sonia Sharma Reviewed-by: James Simmons Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/30690 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- libcfs/libcfs/linux/linux-cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcfs/libcfs/linux/linux-cpu.c b/libcfs/libcfs/linux/linux-cpu.c index 59e9986..b7d6193 100644 --- a/libcfs/libcfs/linux/linux-cpu.c +++ b/libcfs/libcfs/linux/linux-cpu.c @@ -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); + } } } -- 1.8.3.1