Re: [PATCH] sysctl: vfs_cache_divisor

From: Randy Dunlap
Date: Fri Mar 23 2007 - 16:39:25 EST


Kyle Moffett wrote:
On Mar 21, 2007, at 19:11:40, Andrew Morton wrote:
On Wed, 21 Mar 2007 16:01:32 -0700 Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
I prefer the fixed-point values for pressure and dirty* to having duplicated entries for each of them. I'll proceed with that idea.

Problem is, if a read of /proc/sys/vm/dirty_ratio is changed to return 7.457 then existing userspace might get confused.

This might be acceptable if we are careful to ensure that reads of /proc/sys/vm/dirty_ratio will always return an integer if it was previously initialised with an integer.

What about instead adding support for fractions (IE: "1/1000") in /proc/sys/vm/dirty_ratio? If the denominator is 100, the default, then it prints in the form "$NUMERATOR", otherwise it prints answers of the form "$NUMERATOR/$DENOMINATOR". Input could be of either form, with the kernel auto-setting the denominator to 100 if none is specified.

Hi,
That makes a lot of sense to me. It gives us finer-grained control
without having to support fixed-point data.

I've been working on the fixed-point data patch, but I'm going to give
this method some time also, to see how it looks in code (instead of just
thinking about it).

Thanks.
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/