Skip to contentSkip to conversation

Add /proc/sys/fs/nfs sysctls to nfsd module

PATCH In review Olaf Kirch 6 participants 13 messages Aug 3, 2006 – Aug 7, 2006

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

PATCH 3/4 Add /proc/sys/fs/nfs sysctls to nfsd module

From: [email protected]
Subject: Add /proc/sys/fs/nfs sysctls to nfsd module

This patch adds the plumbing for adding nfs-specific sysctls to fs/nfs, and makes the max size of a readdirplus reply tunable.

The reason for this is that we found that some clients do not seem to grok readdirplus replies larger than 4K. Rather than reducing the overall number this sysctl allows admins to work around these clients.

 fs/nfsd/nfs3xdr.c         |    5 ++++-
 fs/nfsd/nfsctl.c          |   28 ++++++++++++++++++++++++++++
 include/linux/nfsd/xdr3.h |    4 ++++
 3 files changed, 36 insertions(+), 1 deletion(-)
fs/nfsd/nfsctl.c +28 -0
Index: linux-2.6.18/fs/nfsd/nfsctl.c
===================================================================
@@ -31,6 +31,7 @@
 #include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/cache.h>
 #include <linux/nfsd/xdr.h>
+#include <linux/nfsd/xdr3.h>
 #include <linux/nfsd/syscall.h>
 #include <linux/nfsd/interface.h>
 
@@ -507,8 +508,28 @@ static struct file_system_type nfsd_fs_t
 	.kill_sb	= kill_litter_super,
 };
 
+ /*
+ * NFS sysctls
+ */
+static struct ctl_table_header *nfsd_sysctl_table;
+
+static ctl_table nfsd_sysctls[] = {
+	{
+		.ctl_name	= -2,
+		.procname	= "nfsd_readdirplus_max",
+		.data		= &nfsd_readdirplus_max,
+		.maxlen		= sizeof(nfsd_readdirplus_max),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.extra1		= &nfsd_readdirplus_max_lb,
+		.extra2		= &nfsd_readdirplus_max_ub,
+	},
+	{ .ctl_name = 0 }
+};
+
 static int __init init_nfsd(void)
 {
+	struct ctl_path ctl_path[] = { { CTL_FS, "fs", 0555 }, { -2, "nfs", 0555 }, { 0 } };
 	int retval;
 	printk(KERN_INFO "Installing knfsd (copyright (C) 1996 [email protected]).\n");
 
@@ -518,6 +539,7 @@ static int __init init_nfsd(void)
 	nfsd_lockd_init();	/* lockd->nfsd callbacks */
 	nfs4_state_init();	/* NFSv4 locking state */
 	nfsd_idmap_init();      /* Name to ID mapping */
+	nfsd_sysctl_table = register_sysctl_table_path(nfsd_sysctls, ctl_path);
 	if (proc_mkdir("fs/nfs", NULL)) {
 		struct proc_dir_entry *entry;
 		entry = create_proc_entry("fs/nfs/exports", 0, NULL);
@@ -532,6 +554,9 @@ static int __init init_nfsd(void)
 		remove_proc_entry("fs/nfs", NULL);
 		nfsd_stat_shutdown();
 		nfsd_lockd_shutdown();
+		if (nfsd_sysctl_table)
+			unregister_sysctl_table(nfsd_sysctl_table);
+		nfsd_sysctl_table = NULL;
 	}
 	return retval;
 }
@@ -546,6 +571,9 @@ static void __exit exit_nfsd(void)
 	nfsd_lockd_shutdown();
 	nfsd_idmap_shutdown();
 	unregister_filesystem(&nfsd_fs_type);
+	if (nfsd_sysctl_table)
+		unregister_sysctl_table(nfsd_sysctl_table);
+	nfsd_sysctl_table = NULL;
 }
 
 MODULE_AUTHOR("Olaf Kirch <[email protected]>");
fs/nfsd/nfs3xdr.c +4 -1
Index: linux-2.6.18/fs/nfsd/nfs3xdr.c
===================================================================
@@ -28,6 +28,9 @@
 # define inline
 #endif
 
+unsigned int	nfsd_readdirplus_max = NFSSVC_MAXBLKSIZE;
+unsigned int	nfsd_readdirplus_max_lb = 512;
+unsigned int	nfsd_readdirplus_max_ub = NFSSVC_MAXBLKSIZE;
 
 /*
  * Mapping of S_IF* types to NFS file types
@@ -573,7 +576,7 @@ nfs3svc_decode_readdirplusargs(struct sv
 	args->dircount = ntohl(*p++);
 	args->count    = ntohl(*p++);
 
-	len = (args->count > NFSSVC_MAXBLKSIZE) ? NFSSVC_MAXBLKSIZE :
+	len = (args->count > nfsd_readdirplus_max) ? nfsd_readdirplus_max :
 						  args->count;
 	args->count = len;
 
include/linux/nfsd/xdr3.h +4 -0
Index: linux-2.6.18/include/linux/nfsd/xdr3.h
===================================================================
@@ -268,6 +268,10 @@ union nfsd3_xdrstore {
 
 #define NFS3_SVC_XDRSIZE		sizeof(union nfsd3_xdrstore)
 
+extern unsigned int			nfsd_readdirplus_max;
+extern unsigned int			nfsd_readdirplus_max_ub;
+extern unsigned int			nfsd_readdirplus_max_lb;
+
 int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
 int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
 				struct nfsd3_sattrargs *);

-------------------------------------------------------------------------
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

#1 lore raw
Quoted 114 lines · Olaf Kirch

From: [email protected]
Subject: Add /proc/sys/fs/nfs sysctls to nfsd module

This patch adds the plumbing for adding nfs-specific sysctls to fs/nfs, and makes the max size of a readdirplus reply tunable.

The reason for this is that we found that some clients do not seem to grok readdirplus replies larger than 4K. Rather than reducing the overall number this sysctl allows admins to work around these clients.

 fs/nfsd/nfs3xdr.c         |    5 ++++-
 fs/nfsd/nfsctl.c          |   28 ++++++++++++++++++++++++++++
 include/linux/nfsd/xdr3.h |    4 ++++
 3 files changed, 36 insertions(+), 1 deletion(-)

Index: linux-2.6.18/fs/nfsd/nfsctl.c
===================================================================

fs/nfsd/nfsctl.c +28 -0
@@ -31,6 +31,7 @@
 #include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/cache.h>
 #include <linux/nfsd/xdr.h>
+#include <linux/nfsd/xdr3.h>
 #include <linux/nfsd/syscall.h>
 #include <linux/nfsd/interface.h>
 
@@ -507,8 +508,28 @@ static struct file_system_type nfsd_fs_t
        .kill_sb        = kill_litter_super,
 };
 
+ /*
+ * NFS sysctls
+ */
+static struct ctl_table_header *nfsd_sysctl_table;
+
+static ctl_table nfsd_sysctls[] = {
+       {
+               .ctl_name       = -2,
+               .procname       = "nfsd_readdirplus_max",
+               .data           = &nfsd_readdirplus_max,
+               .maxlen         = sizeof(nfsd_readdirplus_max),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .extra1         = &nfsd_readdirplus_max_lb,
+               .extra2         = &nfsd_readdirplus_max_ub,
+       },
+       { .ctl_name = 0 }
+};
+
 static int __init init_nfsd(void)
 {
+       struct ctl_path ctl_path[] = { { CTL_FS, "fs", 0555 }, { -2, "nfs", 0555 }, { 0 } };
        int retval;
        printk(KERN_INFO "Installing knfsd (copyright (C) 1996 [email protected]).\n");
 
@@ -518,6 +539,7 @@ static int __init init_nfsd(void)
        nfsd_lockd_init();      /* lockd->nfsd callbacks */
        nfs4_state_init();      /* NFSv4 locking state */
        nfsd_idmap_init();      /* Name to ID mapping */
+       nfsd_sysctl_table = register_sysctl_table_path(nfsd_sysctls, ctl_path);
        if (proc_mkdir("fs/nfs", NULL)) {
                struct proc_dir_entry *entry;
                entry = create_proc_entry("fs/nfs/exports", 0, NULL);
@@ -532,6 +554,9 @@ static int __init init_nfsd(void)
                remove_proc_entry("fs/nfs", NULL);
                nfsd_stat_shutdown();
                nfsd_lockd_shutdown();
+               if (nfsd_sysctl_table)
+                       unregister_sysctl_table(nfsd_sysctl_table);
+               nfsd_sysctl_table = NULL;
        }
        return retval;
 }
@@ -546,6 +571,9 @@ static void __exit exit_nfsd(void)
        nfsd_lockd_shutdown();
        nfsd_idmap_shutdown();
        unregister_filesystem(&nfsd_fs_type);
+       if (nfsd_sysctl_table)
+               unregister_sysctl_table(nfsd_sysctl_table);
+       nfsd_sysctl_table = NULL;
 }
 
 MODULE_AUTHOR("Olaf Kirch <[email protected]>");

Index: linux-2.6.18/fs/nfsd/nfs3xdr.c
===================================================================

fs/nfsd/nfs3xdr.c +4 -1
@@ -28,6 +28,9 @@
 # define inline
 #endif
 
+unsigned int   nfsd_readdirplus_max = NFSSVC_MAXBLKSIZE;
+unsigned int   nfsd_readdirplus_max_lb = 512;
+unsigned int   nfsd_readdirplus_max_ub = NFSSVC_MAXBLKSIZE;
 
 /*
  * Mapping of S_IF* types to NFS file types
@@ -573,7 +576,7 @@ nfs3svc_decode_readdirplusargs(struct sv
        args->dircount = ntohl(*p++);
        args->count    = ntohl(*p++);
 
-       len = (args->count > NFSSVC_MAXBLKSIZE) ? NFSSVC_MAXBLKSIZE :
+       len = (args->count > nfsd_readdirplus_max) ? nfsd_readdirplus_max :
                                                  args->count;
        args->count = len;
 

Index: linux-2.6.18/include/linux/nfsd/xdr3.h
===================================================================

include/linux/nfsd/xdr3.h union nfsd3_xdrstore { · line 277

Quoted 10 lines
include/linux/nfsd/xdr3.h +4 -0
@@ -268,6 +268,10 @@ union nfsd3_xdrstore {
 
 #define NFS3_SVC_XDRSIZE               sizeof(union nfsd3_xdrstore)
 
+extern unsigned int                    nfsd_readdirplus_max;
+extern unsigned int                    nfsd_readdirplus_max_ub;
+extern unsigned int                    nfsd_readdirplus_max_lb;
+
 int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
 int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
                                struct nfsd3_sattrargs *);

I don't recall the history of /proc/sys/fs -- is there also a /proc/sys/fs/nfsd directory, and wouldn't it be better to add this particular sysctl in there?

Any thoughts about providing a mechanism for tuning or disabling readdirplus on the client as well? If we provided such a mechanism, would it not collide with the server tunable in /proc/sys/fs/nfs ?

Signature · 11 lines
"We who cut mere stones must always be envisioning cathedrals"
   -- Quarry worker's creed

-------------------------------------------------------------------------
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
#2 lore raw
Quoted 3 lines · Chuck Lever

I don't recall the history of /proc/sys/fs -- is there also a /proc/sys/fs/nfsd directory, and wouldn't it be better to add this particular sysctl in there?

I too would prefer to reserve /proc/sys/fs/nfs for client and/or common stuff (like the lockd listening ports).

There is an nfsd filesystem (usually mounted on /proc/fs/nfsd), for which the above is more appropriate.

Note, however, that the entire sysctl should be unnecessary. Clients are supposed to tell the server how large a reply to return, by means of the 'maxcount' argument (see RFC1813). If the clients aren't doing that, then they really need to be fixed.
Linux clients should, AFAIK, always be setting maxcount to PAGE_CACHE_SIZE == 4k.

Cheers,
Trond

-------------------------------------------------------------------------
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

author
#3 lore raw
Quoted 6 lines

Note, however, that the entire sysctl should be unnecessary. Clients are supposed to tell the server how large a reply to return, by means of the 'maxcount' argument (see RFC1813). If the clients aren't doing that, then they really need to be fixed.

From a distributor's point of view, waiting for the client vendor to

fix their bugs is often not the best way to go. People buying support contracts expect a fix, no matter buy whom, they only want it NOW :-) But I understand if you reject this for upstream.

Olaf

Signature · 11 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

-------------------------------------------------------------------------
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
#4 lore raw
In reply to Chuck Lever
Quoted 10 lines · Chuck Lever
Quoted 9 lines · Olaf Kirch

From: [email protected]
Subject: Add /proc/sys/fs/nfs sysctls to nfsd module

This patch adds the plumbing for adding nfs-specific sysctls to fs/nfs, and makes the max size of a readdirplus reply tunable.

The reason for this is that we found that some clients do not seem to grok readdirplus replies larger than 4K. Rather than reducing the overall number this sysctl allows admins to work around these clients.

Neat.

Quoted 11 lines

fs/nfsd/nfs3xdr.c nfs3svc_decode_readdirplusargs(struct sv · line 582

Quoted 11 lines
fs/nfsd/nfs3xdr.c +1 -1
@@ -573,7 +576,7 @@ nfs3svc_decode_readdirplusargs(struct sv
        args->dircount = ntohl(*p++);
        args->count    = ntohl(*p++);
 
-       len = (args->count > NFSSVC_MAXBLKSIZE) ? NFSSVC_MAXBLKSIZE :
+       len = (args->count > nfsd_readdirplus_max) ? nfsd_readdirplus_max :
                                                  args->count;
        args->count = len;
 

Neil, a headsup: this hunk clashes with one in the server large wsize patch, and will require minor and obvious manual adjustment.

Quoted 2 lines

I don't recall the history of /proc/sys/fs -- is there also a /proc/sys/fs/nfsd directory,

No.

Quoted 2 lines

and wouldn't it be better to add this
particular sysctl in there?

I'd be happy to see such a thing. One of my pending patches adds serverside sysctls; it feels wrong putting them in /proc/sys/fs/nfs/. OTOH that directory already has four serverside NLM entries that people do use.

Greg.

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
#5 lore raw
Quoted 5 lines · Greg Banks
Quoted 4 lines · Chuck Lever
Quoted 3 lines · Olaf Kirch

From: [email protected]
Subject: Add /proc/sys/fs/nfs sysctls to nfsd module

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

This patch adds the plumbing for adding nfs-specific sysctls to fs/nfs, and makes the max size of a readdirplus reply tunable.

The reason for this is that we found that some clients do not seem to grok readdirplus replies larger than 4K. Rather than reducing the overall number this sysctl allows admins to work around these clients.

Neat.

Not really. It would be better to identify and fix the buggy clients that aren't setting the READDIRPLUS maxcount parameter correctly.

Cheers,
Trond

-------------------------------------------------------------------------
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

author
#6 lore raw
Quoted 2 lines · Trond Myklebust

Not really. It would be better to identify and fix the buggy clients that aren't setting the READDIRPLUS maxcount parameter correctly.

One of them was Solaris 9, IIRC. Don't recall what the other one was. I contacted at least Sun, but that didn't go anywhere.

Olaf

Signature · 11 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

-------------------------------------------------------------------------
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
#7 lore raw
Quoted 6 lines · Olaf Kirch
Quoted 2 lines · Trond Myklebust

Not really. It would be better to identify and fix the buggy clients that aren't setting the READDIRPLUS maxcount parameter correctly.

One of them was Solaris 9, IIRC. Don't recall what the other one was. I contacted at least Sun, but that didn't go anywhere.

Yeah.... Solaris appears to have a warped design in their READDIR code. They want to specify one size for the actual READDIR reply, and one size for all the extra READDIRPLUS gunk (see pages 209 and 210 in Brent's 'NFS Illustrated').
In their case, you want to look at the 'dircount' parameter, and truncate the readdirplus reply when you hit 'dircount' bytes of filename +fileid information. After that, you have to look at the total XDR information, and truncate again when you hit 'maxcount' bytes.

Sucks, sucks, sucks....

Trond

-------------------------------------------------------------------------
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

#8 lore raw
Quoted 20 lines · Trond Myklebust
Quoted 8 lines · Olaf Kirch
Quoted 3 lines · Trond Myklebust

Not really. It would be better to identify and fix the buggy clients that aren't setting the READDIRPLUS maxcount parameter correctly.

One of them was Solaris 9, IIRC. Don't recall what the other one was. I contacted at least Sun, but that didn't go anywhere.

Yeah.... Solaris appears to have a warped design in their READDIR code. They want to specify one size for the actual READDIR reply, and one size for all the extra READDIRPLUS gunk (see pages 209 and 210 in Brent's 'NFS Illustrated').
In their case, you want to look at the 'dircount' parameter, and truncate the readdirplus reply when you hit 'dircount' bytes of filename +fileid information. After that, you have to look at the total XDR information, and truncate again when you hit 'maxcount' bytes.

Quoted 1 line

Sucks, sucks, sucks....

Actually, the Solaris implementation matches the intended semantics as described in RFC1813. The number of bytes of requested information via readdir(3) is passed via dircount and then the maximum size of the response is passed through maxcount.

The two fields were intended to be used to reduce the overhead on the server by passing a hint for the amount of data that the client was actually looking for and then a count for the maximum sized response that it was prepared to handle.

Solaris probably uses something like 1048/32768 or 8192/32768, doesn't it?

    Thanx...

       ps

-------------------------------------------------------------------------
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

author
#9 lore raw
Quoted 7 lines · Peter Staubach

The two fields were intended to be used to reduce the overhead on the server by passing a hint for the amount of data that the client was actually looking for and then a count for the maximum sized response that it was prepared to handle.

Solaris probably uses something like 1048/32768 or 8192/32768, doesn't it?

I don't remember the values, all I know was that it got stuck in READDIRPLUS, repeating the same call over and over again. And it can't have been that many directory entries (definitely not in the thousands), and IIRC we didn't hit the maxcount limit.

Olaf

Signature · 11 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

-------------------------------------------------------------------------
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
#10 lore raw
In reply to Peter Staubach
Quoted 11 lines · Peter Staubach
Quoted 1 line

Sucks, sucks, sucks....

Actually, the Solaris implementation matches the intended semantics as described in RFC1813. The number of bytes of requested information via readdir(3) is passed via dircount and then the maximum size of the response is passed through maxcount.

The two fields were intended to be used to reduce the overhead on the server by passing a hint for the amount of data that the client was actually looking for and then a count for the maximum sized response that it was prepared to handle.

Right. At first glance a good idea, but in practice it sucks because the client has no idea of how much data it was looking for. In order to know, it would need to know the length of the filenames in the directory. Unless it is already caching the directory, that will be 100% guesswork.

Cheers,
Trond

-------------------------------------------------------------------------
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

#11 lore raw
In reply to Greg Banks
Quoted 4 lines · On Friday August 4, [email protected] wrote:

Neil, a headsup: this hunk clashes with one in the server large wsize patch, and will require minor and obvious manual adjustment.

Ack.

Quoted 5 lines
Quoted 2 lines

I don't recall the history of /proc/sys/fs -- is there also a /proc/sys/fs/nfsd directory,

No.

Quoted 7 lines
Quoted 2 lines

and wouldn't it be better to add this
particular sysctl in there?

I'd be happy to see such a thing. One of my pending patches adds serverside sysctls; it feels wrong putting them in /proc/sys/fs/nfs/. OTOH that directory already has four serverside NLM entries that people do use.

And all those nlm tunables are in
/sys/module/lockd/parameters/
as well.

So here is the question. Should nfsd tunables go in
- /proc/sys/fs/something. ?
I agree that /proc/sys/fs/nfs isn't the best place. An .../nfsd could be created ofcourse

- /sys/module/nfsd/parameters/ ?
I like this approach. Believe it or not, 'nfsd' is not a filesystem. It is a .... service? So putting it under 'fs' has always felt wrong. And using the modules parameter approach makes it look more like a parameter to a module rather than a config for some filesystem...

- The 'nfsd' filesystem.
(which is mounted under /proc/fs ... I'm beginning to regret that
name choice just a little, but there wasn't anywhere else obvious).
This is probably best from a usability perspective - all nfsd stuff in the one place.

So of the three options - the one that I find it hardest to justify if /proc/sys, which is what the original patch uses - sad.

Other opinions on which is best?

NeilBrown

-------------------------------------------------------------------------
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

author
#12 lore raw
Quoted 2 lines · Neil Brown

So of the three options - the one that I find it hardest to justify if /proc/sys, which is what the original patch uses - sad.

I have no problem with fixing up the patch to use any other mechanism. But if we do this, I think we should move all tunables. Having them in multiple places just sucks. This includes /proc/sys/sunrpc/*_debug (which ended up in /proc/sys/sunrpc because a the time I wrote this code, there was no way a module could create a sysctl directory).

Olaf

Signature · 11 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

-------------------------------------------------------------------------
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