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 <[email protected]>
--- 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,
},
{
On Tue, 1 Jul 2008 11:44:29 -0700
Stephen Hemminger <[email protected]> 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 <[email protected]>
>
> --- 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.