From: Dmitry Eremin Date: Tue, 17 Oct 2017 09:02:35 +0000 (+0300) Subject: LU-9998 libcfs: split single NUMA node into partitions X-Git-Tag: 2.10.4-RC1~120 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F30690%2F3;p=fs%2Flustre-release.git 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 --- 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); + } } }