From cbab0aa32ed2d21f59aae3a28285b49802b734f2 Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Mon, 23 Sep 2013 09:31:57 +0300 Subject: [PATCH] LU-3992 libcfs: Fix NUMA emulated mode Kernel commit c1c3443c9c5e9be92641029ed229a41563e44506 assigns all allowed cpus to emulated node. End cpt initialization loop when all CPUs are assigned. Change-Id: I4cf22e4cf58cd8377cf19af30217fec72503be69 Signed-off-by: Andriy Skulysh Reviewed-on: http://review.whamcloud.com/7724 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin --- libcfs/libcfs/linux/linux-cpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcfs/libcfs/linux/linux-cpu.c b/libcfs/libcfs/linux/linux-cpu.c index eea82ee..18bbcfb 100644 --- a/libcfs/libcfs/linux/linux-cpu.c +++ b/libcfs/libcfs/linux/linux-cpu.c @@ -814,8 +814,12 @@ cfs_cpt_table_create(int ncpt) struct cfs_cpu_partition *part; int n; - if (cpt >= ncpt) - goto failed; + /* Each emulated NUMA node has all allowed CPUs in + * the mask. + * End loop when all partitions have assigned CPUs. + */ + if (cpt == ncpt) + break; part = &cptab->ctb_parts[cpt]; -- 1.8.3.1