[PATCH 3/3] sunrpc: change default for pooled services toSVC_POOL_AUTO and make settings persistent

From: Jeff Layton
Date: Tue Jun 03 2008 - 07:18:44 EST


The current default for pooled services is SVC_POOL_GLOBAL, which just
does allocations in whatever pool the current process is running, and
doesn't restrict which CPUs the tasks will run.

Change the default to SVC_POOL_AUTO so that large-scale machines will
automatically choose an allocation and cpu masking scheme that's better
suited to their architecture. Also, change it so that when the pool
refcount goes to zero, that we do not reset the allocation scheme to the
compile-time default. The setting should stick once it's made.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---

net/sunrpc/svc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index a61e7aa..7238c37 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -39,7 +39,7 @@ enum {
SVC_POOL_PERCPU, /* one pool per cpu */
SVC_POOL_PERNODE /* one pool per numa node */
};
-#define SVC_POOL_DEFAULT SVC_POOL_GLOBAL
+#define SVC_POOL_DEFAULT SVC_POOL_AUTO

/*
* Structure for mapping cpus to pools and vice versa.
@@ -280,7 +280,6 @@ svc_pool_map_put(void)
mutex_lock(&svc_pool_map_mutex);

if (!--m->count) {
- m->mode = SVC_POOL_DEFAULT;
kfree(m->to_pool);
kfree(m->pool_to);
m->npools = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/