knfsd: handle non-contiguous cpu and node numbers
Subsystems (3)
PATCH 1/1 knfsd: handle non-contiguous cpu and node numbers
knfsd: when allocating per-cpu or per-node rpc thread pools, handle the case of noncontiguous cpu or node numbers.
Tested:
Machine ARCH SMP NUMA SUNRPC nodes cpus hpni hppi pools(mode) ------- ---- --- ---- ------ ----- ---- ---- ---- ------------ 4 cpu Xeon SMP x86_64 y y y 1 4 31 7 4 (percpu) 4 cpu Xeon SMP x86_64 y y m 1 4 31 7 4 (percpu) 4 cpu Xeon SMP x86_64 y n y 0 4 0 7 4 (percpu) 4 cpu Xeon SMP x86_64 y n m 0 4 0 7 4 (percpu) 4 cpu Xeon SMP x86_64 n n y 0 1 0 0 1 (global) 4 cpu Xeon SMP x86_64 n n m 0 1 0 0 1 (global) 4 cpu (2 node) Itanium NUMA ia64 y y m 2 4 1023 3 2 (pernode) 2 cpu (1 node) Itanium NUMA ia64 y y m 1 2 1023 1 1 (global)
* number of nodes and cpus from /sys/devices/system/
* hpni = value of highest_possible_node_id()
* hppi = value of highest_possible_processor_id()
Signed-off-by Greg Banks <[email protected]>
---
net/sunrpc/svc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/svc.c +2 -2
@@ -116,7 +116,7 @@ fail:static int svc_pool_map_init_percpu (struct svc_pool_map *m) { -unsigned int maxpools =num_possible_cpus (); +unsigned int maxpools =highest_possible_processor_id ()+1 ;unsigned int pidx =0 ;unsigned int cpu;int err;
@@ -144,7 +144,7 @@ svc_pool_map_init_percpu(struct svc_poolstatic int svc_pool_map_init_pernode (struct svc_pool_map *m) { -unsigned int maxpools =num_possible_nodes (); +unsigned int maxpools =highest_possible_node_id ()+1 ;unsigned int pidx =0 ;unsigned int node;int err;
Signature · 13 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs