xfs
[Top] [All Lists]

Re: [patch 1/1] Make XFS sysctl parameters use USER_HZ instead of HZ.

To: bart@xxxxxxxxx
Subject: Re: [patch 1/1] Make XFS sysctl parameters use USER_HZ instead of HZ.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 5 Apr 2004 08:38:39 +0100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <E1B9j4r-00081Q-DD@samwel.tk>; from bart@samwel.tk on Sat, Apr 03, 2004 at 01:12:40PM +0200
References: <E1B9j4r-00081Q-DD@samwel.tk>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
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.


<Prev in Thread] Current Thread [Next in Thread>