Re: [patch] my latest oom stuff

Stephen C. Tweedie (sct@redhat.com)
Tue, 10 Nov 1998 14:21:23 GMT


Hi,

On Thu, 5 Nov 1998 20:17:25 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:

> If you think that the sysctl interface has to remains totally backwards
> compatible even if in a 2.1.x unstable cycle this is another issue and
> probably you have to ask Linus to not apply my patch.

--- linux/include/linux/sysctl.h:1.1.1.3 Sat Oct 31 01:16:09 1998
+++ linux/include/linux/sysctl.h Sat Oct 31 01:36:44 1998
@@ -93,7 +93,6 @@
enum
{
/*1*/ VM_SWAPCTL=1, /* struct: Set vm swapping control */
- VM_SWAPOUT, /* int: Background pageout interval */
VM_FREEPG, /* struct: Set free page thresholds */
VM_BDFLUSH, /* struct: Control buffer cache flushing */
VM_OVERCOMMIT_MEMORY, /* Turn off the virtual memory safety limit */

The problem is that if you do this, you don't just break one single
sysctl: you break *every single one* in the CTL_VM space, because you
renumber all of the subsequent sysctl names. You don't have to keep the
interface totally backwards compatible, but you _do_ have to avoid
gratuitously breaking the entire interface when you remove a single
entry.

> Personally I like clean things but I know that such sysctl can' t harm
> in memory used and runtime efficiency. If it would break some popular
> application (so that the app to be fixed would have to check every
> time for uname -r) probably I would left the sysctl.h unchanged.

That shouldn't matter. If you change existing functionality in sysctl,
just delete the old entry and add a new one with a different number: any
process which requests the old one will get a clean error back. Just
don't renumber any of the other entries.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/