Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfs: sysctl's should use USER_HZ not HZ
@ 2008-07-01 18:44 Stephen Hemminger
  2008-07-01 18:50 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2008-07-01 18:44 UTC (permalink / raw)
  To: linux-nfs

There is no good way to tell what the internal value of kernel HZ is
from userspace, so all administrative interfaces are supposed to use
either USER_HZ (100) or other absolute time units.  Two of the NFS sysctl
values are still using HZ, and can be simply converted to USER_HZ.

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

--- a/fs/nfs/sysctl.c	2008-07-01 11:37:13.000000000 -0700
+++ b/fs/nfs/sysctl.c	2008-07-01 11:38:21.000000000 -0700
@@ -37,7 +37,7 @@ static ctl_table nfs_cb_sysctls[] = {
 		.data = &nfs_idmap_cache_timeout,
 		.maxlen = sizeof(int),
 		.mode = 0644,
-		.proc_handler = &proc_dointvec_jiffies,
+		.proc_handler = &proc_dointvec_userhz_jiffies,
 		.strategy = &sysctl_jiffies,
 	},
 #endif
@@ -47,7 +47,7 @@ static ctl_table nfs_cb_sysctls[] = {
 		.data		= &nfs_mountpoint_expiry_timeout,
 		.maxlen		= sizeof(nfs_mountpoint_expiry_timeout),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec_jiffies,
+		.proc_handler	= &proc_dointvec_userhz_jiffies,
 		.strategy	= &sysctl_jiffies,
 	},
 	{

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfs: sysctl's should use USER_HZ not HZ
  2008-07-01 18:44 [PATCH] nfs: sysctl's should use USER_HZ not HZ Stephen Hemminger
@ 2008-07-01 18:50 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2008-07-01 18:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: linux-nfs

On Tue, 1 Jul 2008 11:44:29 -0700
Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org> wrote:

> There is no good way to tell what the internal value of kernel HZ is
> from userspace, so all administrative interfaces are supposed to use
> either USER_HZ (100) or other absolute time units.  Two of the NFS sysctl
> values are still using HZ, and can be simply converted to USER_HZ.
> 
> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
> 
> --- a/fs/nfs/sysctl.c	2008-07-01 11:37:13.000000000 -0700
> +++ b/fs/nfs/sysctl.c	2008-07-01 11:38:21.000000000 -0700
> @@ -37,7 +37,7 @@ static ctl_table nfs_cb_sysctls[] = {
>  		.data = &nfs_idmap_cache_timeout,
>  		.maxlen = sizeof(int),
>  		.mode = 0644,
> -		.proc_handler = &proc_dointvec_jiffies,
> +		.proc_handler = &proc_dointvec_userhz_jiffies,
>  		.strategy = &sysctl_jiffies,
>  	},
>  #endif
> @@ -47,7 +47,7 @@ static ctl_table nfs_cb_sysctls[] = {
>  		.data		= &nfs_mountpoint_expiry_timeout,
>  		.maxlen		= sizeof(nfs_mountpoint_expiry_timeout),
>  		.mode		= 0644,
> -		.proc_handler	= &proc_dointvec_jiffies,
> +		.proc_handler	= &proc_dointvec_userhz_jiffies,
>  		.strategy	= &sysctl_jiffies,
>  	},
>  	{

Never mind... proc_dointvec_jiffies converts to/from seconds.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-01 18:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 18:44 [PATCH] nfs: sysctl's should use USER_HZ not HZ Stephen Hemminger
2008-07-01 18:50 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox