The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Banks <gnb@melbourne.sgi.com>,
	nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 004 of 4] knfsd: Provide sunrpc pool_mode module option
Date: Tue, 6 Mar 2007 16:11:50 +1100	[thread overview]
Message-ID: <17900.63510.307044.43948@notabene.brown> (raw)
In-Reply-To: message from Andrew Morton on Monday March 5

On Monday March 5, akpm@linux-foundation.org wrote:
> On Tue, 6 Mar 2007 13:15:20 +1100 NeilBrown <neilb@suse.de> wrote:
> 
> > Provide a module param "pool_mode" for sunrpc.ko which allows a
> > sysadmin to choose the mode for mapping NFS thread service pools
> > to CPUs.  Values are:
> > 
> > auto	    choose a mapping mode heuristically
> > global	    (default, same as the pre-2.6.19 code) a single global pool
> > percpu	    one pool per CPU
> > pernode	    one pool per NUMA node
> > 
> > Note that since 2.6.19 the hardcoded behaviour has been "auto",
> > this patch makes the default "global".
> > 
> > The pool mode can be changed after boot/modprobe using /sys, if the
> > NFS and lockd services have been shut down.  A useful side effect of
> > this change is to fix a small memory leak when unloading the module.
> 
> Mutter.  Is this really suitable and needed for 2.6.21 at this stage in
> its life?

Something is definitely needed.  Currently on a 4-way SMP machine,
nfsd might only use 1 CPU (depends a bit on irq routing I think).

If that patch is too big, maybe this one?

NeilBrown

--------------------------------
Avoid using nfsd process pools on SMP machines.

From: Neil Brown <neilb@suse.de>

process-pools have real benefits for NUMA, but on SMP
machines they only work if network interface interrupts
go to all CPUs (via round-robin or multiple nics).  This is
not always the case, so disable the pools in this case until
a better solution is developped.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./net/sunrpc/svc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff .prev/net/sunrpc/svc.c ./net/sunrpc/svc.c
--- .prev/net/sunrpc/svc.c	2007-03-06 16:07:19.000000000 +1100
+++ ./net/sunrpc/svc.c	2007-03-06 16:08:53.000000000 +1100
@@ -79,7 +79,11 @@ svc_pool_map_choose_mode(void)
 		 * x86_64 kernel on Xeons.  In this case we
 		 * want to divide the pools on cpu boundaries.
 		 */
-		return SVC_POOL_PERCPU;
+		/* actually, unless your IRQs round-robin nicely,
+		 * this turns out to be really bad, so just
+		 * go GLOBAL for now until a better fix can be developped
+		 */
+		return SVC_POOL_GLOBAL;
 	}
 
 	/* default: one global pool */

      reply	other threads:[~2007-03-06  5:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  2:15 [PATCH 000 of 4] knfsd: revised patches to fix IPv6/sunrpc link error and other fixes NeilBrown
2007-03-06  2:15 ` [PATCH 001 of 4] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying NeilBrown
2007-03-06  2:15 ` [PATCH 002 of 4] knfsd: Remove CONFIG_IPV6 ifdefs from sunrpc server code NeilBrown
2007-03-06  2:15 ` [PATCH 003 of 4] knfsd: Fix recently introduced problem with shutting down a busy NFS server NeilBrown
2007-03-06  2:15 ` [PATCH 004 of 4] knfsd: Provide sunrpc pool_mode module option NeilBrown
2007-03-06  4:57   ` Andrew Morton
2007-03-06  5:11     ` Neil Brown [this message]

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=17900.63510.307044.43948@notabene.brown \
    --to=neilb@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=gnb@melbourne.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --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