On Sat, Apr 03, 2004 at 01:12:40PM +0200, bart@xxxxxxxxx wrote:
>
> From: Bart Samwel <bart@xxxxxxxxx>
>
> The sysctl parameters sync_interval, flush_interval and age_buffer are
> in units of jiffies, which are very variable between kernels and
> architectures. These parameters should use USER_HZ, which is meant for
> use in external interfaces.
>
> Rationale: If there is no interface with a reliable unit, the laptop mode
> control script can never work reliably, because it then needs to know the
> value of HZ, which is intentionally not exported from the kernel anywhere.
>
> Possible improvement (matter of taste): renaming the variables, so that
> old code knows that the new variables are in new units. I suggest to not
> do this, because the variables previously didn't have any usable unit
> anyway. Any code that was written against this interface had to assume
> some HZ and would _have_ to have known that it would break with _any_
> change in HZ.
I think this is problematic because schedule_timeout() expects these in
units of HZ. So you need to re-unit them somewhere in the sysctl handler,
IIRC the networking folks even added special sysctl handlers that do it
automatically.
|