On Wed, 2007-10-31 at 17:57 +0800, Zhang, Yanmin wrote:
=20
=20
=20
=20
ormance
d
y(Might not
on the old
ssion on tigerton
akley machine,
000000,
).
d_latency_ns,
latency becomes
Oops, yeah I think I overlooked that case :-/
I think limiting the sysctl parameters make most sense, as a 0 value
really doesn't.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 3b4efbe..0f34c91 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -94,6 +94,7 @@ static int two =3D 2;
=20
static int zero;
static int one_hundred =3D 100;
+static int int_max =3D INT_MAX;
=20
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and G=
ID */
static int maxolduid =3D 65535;
@@ -239,7 +240,10 @@ static struct ctl_table kern_table[] =3D {
.data =3D &sysctl_sched_nr_latency,
.maxlen =3D sizeof(unsigned int),
.mode =3D 0644,
- .proc_handler =3D &proc_dointvec,
+ .proc_handler =3D &proc_dointvec_minmax,
+ .strategy =3D &sysctl_intvec,
+ .extra1 =3D &one,
+ .extra2 =3D &int_max,
},
{
.ctl_name =3D CTL_UNNUMBERED,