Linux Kernel 2.4 Useful Patches

Web access to the GIT repository - GIT access to the repository

strict-overcommit : Strict VM overcommit accounting

This patch adds strict VM overcommit accounting to the mainline 2.4 kernel, thus allowing overcommit to be truly disabled. This feature has been in 2.4-ac, Red Hat Enterprise Linux 3 (RHEL 3) vendor kernels, and 2.6 for a long while.

Initial date:2005/12/29
Description:Strict VM overcommit accounting
Author(s):Barry K.Nathan
Conflicts with:pax, grsecurity
See also:oc+pax
Abstract:This patch adds strict VM overcommit accounting to the mainline 2.4 kernel, thus allowing overcommit to be truly disabled. This feature has been in 2.4-ac, Red Hat Enterprise Linux 3 (RHEL 3) vendor kernels, and 2.6 for a long while.

Notes

Most of the code was merged from 2.4.27-pre2-pac1, as well as a hunk from 2.4.22-ac4 for fs/exec.c that was missing from the -pac kernels. (Without that, the patch was seriously broken.) I also added a fork-related accounting fix from the RHEL 3 kernel -- it turns out that the exact same fix is also present in 2.6. Finally, I backported changes to move_vma() from 2.6, so that do_munmap() does not need a 4th argument; this avoids disrupting arch and driver code.

This patch is against 2.4.33-pre1, although it applies to 2.4.32 as well, and that is where I did most of my testing. I'm hoping that it's not too late to add this to mainline 2.4, although I realize that it might be.

Known problems/quirks of this patch:

  • The documentation (from -pac) mentions an overcommit mode 3, which does not appear to actually exist (as far as I can tell). This can be fixed in a future patch, and I'll probably do that soon.
  • Like -ac/-pac, but unlike RHEL 3 or mainline 2.6, this patch does not add Committed_AS to /proc/meminfo. IMO it's an insanely useful bit of information to have, so I'll have another patch very soon to add this.

Signed-off-by: Barry K. Nathan


Contents
  • Strict VM overcommit accounting for 2.4.32/2.4.33-pre1 - Barry K.Nathan - 2005/12/29
    This patch adds strict VM overcommit accounting to the mainline 2.4 kernel, thus allowing overcommit to be truly disabled. This feature has been in 2.4-ac, Red Hat Enterprise Linux 3 (RHEL 3) vendor kernels, and 2.6 for a long while.
    Local link : 2.4.33-pre1-strict-overcommit-1

  • add CommitLimit, Committed_AS to 2.4 strict VM overcommit - Barry K.Nathan - 2005/12/29
    This patch adds two more lines of output to /proc/meminfo, CommitLimit and Committed_AS. On a system running the strict VM overcommit patch, these are useful bits of information (especially Committed_AS, which lets you know how close you are to full committment).
    Local link : 2.4.33-pre1-overcommit-stats-1


(C) Willy Tarreau - 2008-06-01