From: Greg Banks <gnb@melbourne.sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Neil Brown <neilb@suse.de>,
Linux NFS Mailing List <nfs@lists.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 4 of 4] knfsd: handle non-contiguous cpu and node numbers
Date: Fri, 04 Aug 2006 15:37:46 +1000 [thread overview]
Message-ID: <1154669863.21040.2357.camel@hole.melbourne.sgi.com> (raw)
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 <gnb@melbourne.sgi.com>
---
net/sunrpc/svc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: linus-git/net/sunrpc/svc.c
===================================================================
--- linus-git.orig/net/sunrpc/svc.c 2006-08-01 15:38:30.000000000 +1000
+++ linus-git/net/sunrpc/svc.c 2006-08-02 13:20:35.979647782 +1000
@@ -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_pool
static 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;
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
reply other threads:[~2006-08-04 5:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154669863.21040.2357.camel@hole.melbourne.sgi.com \
--to=gnb@melbourne.sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®