In article <20050218024917.2e5c19ec.akpm@xxxxxxxx> (at Fri, 18 Feb 2005
02:49:17 -0800), Andrew Morton <akpm@xxxxxxxx> says:
> YOSHIFUJI Hideaki / ____________ <yoshfuji@xxxxxxxxxxxxxx> wrote:
> >
> > Recently, we added gc_min_interval_ms procfs/sysctl.
> >
> > Because type of ip_rt_gc_min_interval is int,
> > use of ulong helpers is inappropriate and unsafe.
> > I believe it breaks some archs that the size of unsigned long
> > is not equal to one of int.
> >
> > So, let's add new sysctl helpers and use them instead.
> > This also fixes inconsistency between procfs and sysctl.
>
> I disagree. ip_rt_gc_min_interval is an `int' and does not need to be
> changed to `long' - note how is is always used as a time delta.
I'm not suggesting to use ulong helpers.
The type of variable (ip_rt_gc_min_interval) is int,
and we erroneously started using ulong helpers for it.
This break memory.
So, I suggest to use appropriate helpers.
> A better approach wold be to rework ip_rt_gc_min_interval so that its
> userspace-visible units are milliseconds.
My patch add a sysctl/procfs helpers to convert units
between milliseconds and jiffies.
Do you still disagree?
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
|