[PATCH] Revised memory-management stuff (was: OOM killer)

Jonathan Morton (chromi@cyberspace.org)
Wed, 4 Apr 2001 13:41:54 -0700 (PDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--1897407998-355975241-986416914=:6489
Content-Type: TEXT/PLAIN; charset=US-ASCII

The attached patch applies to 2.4.3 and should address the most serious
concerns surrounding OOM and low-memory situations for most people. A
summary of the patch contents follows:

MAJOR: OOM killer now only activates when truly out of memory, ie. when
buffer and cache memory has already been eaten down to the bone.

MEDIUM: The allocation mechanism will now only allow processes to reserve
memory if there is sufficient memory remaining *and* the process is not
already hogging RAM. IOW, if the allocating process is already 4x the
size of the remaining free memory, reservation of more memory (by fork(),
malloc() or related calls) will fail.

MEDIUM: The OOM killer algorithm has been reworked to be a little more
intelligent by default, and also now allows the sysadmin to specify PIDs
and/or process names which should be left untouched. Simply echo a
space-delimited list of PIDs and/or process names into
/proc/sys/vm/oom-no-kill, and the OOM killer will ignore all processes
matching any entry in the list until only they and init remain. Init (as
PID 1 or as a root process named "init") is now always
ignored. TODO: make certain parameters of the OOM killer configurable.

W-I-P: The memory-accounting code from an old 2.3.99 patch has been
re-introduced, but is in sore need of debugging. It can be activated by
echoing a negative number into /proc/sys/vm/overcommit_memory - but do
this at your own risk. Interested kernel hackers should alter the
"#define VM_DEBUG 0" to 1 in include/linux/mm.h to view lots of debugging
and warning messages. I have seen the memory-accounting code attempt to
"free" blocks of memory exceeding 2GB which had never been allocated,
while running gcc. The sanity-check code detects these anomalies and
attempts to correct for them, but this isn't good...

SIDE EFFECT: All parts of the kernel which can change the total amount of
VM (eg. by adding/removing swap) should now call
vm_invalidate_totalmem() to notify the VM about this. A new function
vm_total() now reports the total amount of VM available. The total VM and
the amount of reserved memory are now available from /proc/meminfo.

--1897407998-355975241-986416914=:6489
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="oom-patch.3.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0104041341540.6489@cr215808-b.poco1.bc.wave.home.com>
Content-Description: Various OOM and low-memory fixes
Content-Disposition: attachment; filename="oom-patch.3.diff"

ZGlmZiAtckJVIDUgbGludXgtMi40LjMvZnMvZXhlYy5jIGxpbnV4LW9vbS9m
cy9leGVjLmMNCi0tLSBsaW51eC0yLjQuMy9mcy9leGVjLmMJVGh1IE1hciAy
MiAwOToyNjoxOCAyMDAxDQorKysgbGludXgtb29tL2ZzL2V4ZWMuYwlUdWUg
QXByICAzIDA5OjMyOjA3IDIwMDENCkBAIC0zODYsMjMgKzM4NiwzMSBAQA0K
IH0NCiANCiBzdGF0aWMgaW50IGV4ZWNfbW1hcCh2b2lkKQ0KIHsNCiAJc3Ry
dWN0IG1tX3N0cnVjdCAqIG1tLCAqIG9sZF9tbTsNCisJc3RydWN0IHRhc2tf
c3RydWN0ICogdHNrID0gY3VycmVudDsNCisJdW5zaWduZWQgbG9uZyByZXNl
cnZlZCA9IDA7DQogDQotCW9sZF9tbSA9IGN1cnJlbnQtPm1tOw0KKwlvbGRf
bW0gPSB0c2stPm1tOw0KIAlpZiAob2xkX21tICYmIGF0b21pY19yZWFkKCZv
bGRfbW0tPm1tX3VzZXJzKSA9PSAxKSB7DQorCSAgICAgICAgLyogS2VlcCBv
bGQgc3RhY2sgcmVzZXJ2YXRpb24gKi8NCiAJCW1tX3JlbGVhc2UoKTsNCiAJ
CWV4aXRfbW1hcChvbGRfbW0pOw0KIAkJcmV0dXJuIDA7DQogCX0NCiANCisJ
cmVzZXJ2ZWQgPSB2bV9lbm91Z2hfbWVtb3J5KHRzay0+cmxpbVtSTElNSVRf
U1RBQ0tdLnJsaW1fY3VyID4+IA0KKwkJCQkgICAgUEFHRV9TSElGVCk7DQor
CWlmKCFyZXNlcnZlZCkNCisJICAgICAgICByZXR1cm4gLUVOT01FTTsNCisN
CiAJbW0gPSBtbV9hbGxvYygpOw0KIAlpZiAobW0pIHsNCi0JCXN0cnVjdCBt
b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g
a0JcbiINCiAgICAgICAgICAgICAgICAgIkxvd0ZyZWU6ICAgICAgJThsdSBr
QlxuIg0KICAgICAgICAgICAgICAgICAiU3dhcFRvdGFsOiAgICAlOGx1IGtC
XG4iDQotICAgICAgICAgICAgICAgICJTd2FwRnJlZTogICAgICU4bHUga0Jc
biIsDQorICAgICAgICAgICAgICAgICJTd2FwRnJlZTogICU4bHUga0JcbiIN
CisgICAgICAgICAgICAgICAgIlZNVG90YWw6ICAgJThsdSBrQlxuIg0KKyAg
ICAgICAgICAgICAgICAiVk1SZXNlcnZlZDolOGx1IGtCXG4iLA0KICAgICAg
ICAgICAgICAgICBLKGkudG90YWxyYW0pLA0KICAgICAgICAgICAgICAgICBL
KGkuZnJlZXJhbSksDQogICAgICAgICAgICAgICAgIEsoaS5zaGFyZWRyYW0p
LA0KICAgICAgICAgICAgICAgICBLKGkuYnVmZmVycmFtKSwNCiAgICAgICAg
ICAgICAgICAgSyhhdG9taWNfcmVhZCgmcGFnZV9jYWNoZV9zaXplKSksDQpA
QCAtMTg4LDExICsxOTAsMTMgQEANCiAgICAgICAgICAgICAgICAgSyhpLnRv
dGFsaGlnaCksDQogICAgICAgICAgICAgICAgIEsoaS5mcmVlaGlnaCksDQog
ICAgICAgICAgICAgICAgIEsoaS50b3RhbHJhbS1pLnRvdGFsaGlnaCksDQog
ICAgICAgICAgICAgICAgIEsoaS5mcmVlcmFtLWkuZnJlZWhpZ2gpLA0KICAg
ICAgICAgICAgICAgICBLKGkudG90YWxzd2FwKSwNCi0gICAgICAgICAgICAg
ICAgSyhpLmZyZWVzd2FwKSk7DQorICAgICAgICAgICAgICAgIEsoaS5mcmVl
c3dhcCksDQorICAgICAgICAgICAgICAgIEsodm1fdG90YWwoKSksIA0KKyAg
ICAgICAgICAgICAgICBLKHZtX3Jlc2VydmVkKSk7DQogDQogCXJldHVybiBw
cm9jX2NhbGNfbWV0cmljcyhwYWdlLCBzdGFydCwgb2ZmLCBjb3VudCwgZW9m
LCBsZW4pO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HNwYWNlIGJhY2sgaW50byBzd2FwX2xp
c3QgKi8NCiAJCXN3YXBfbGlzdF9sb2NrKCk7DQogCQlmb3IgKHByZXYgPSAt
MSwgaSA9IHN3YXBfbGlzdC5oZWFkOyBpID49IDA7IHByZXYgPSBpLCBpID0g
c3dhcF9pbmZvW2ldLm5leHQpDQogCQkJaWYgKHAtPnByaW8gPj0gc3dhcF9p
bmZvW2ldLnByaW8pDQpAQCAtNDg1LDEwICs0OTksMTEgQEANCiANCiBvdXRf
ZHB1dDoNCiAJdW5sb2NrX2tlcm5lbCgpOw0KIAlwYXRoX3JlbGVhc2UoJm5k
KTsNCiBvdXQ6DQorCXZtX2ludmFsaWRhdGVfdG90YWxtZW0oKTsNCiAJcmV0
dXJuIGVycjsNCiB9DQogDQogaW50IGdldF9zd2FwYXJlYV9pbmZvKGNoYXIg
KmJ1ZikNCiB7DQpAQCAtNzg5LDEwICs4MDQsMTEgQEANCiAJCSsrbGVhc3Rf
cHJpb3JpdHk7DQogCXBhdGhfcmVsZWFzZSgmbmQpOw0KIG91dDoNCiAJaWYg
KHN3YXBfaGVhZGVyKQ0KIAkJZnJlZV9wYWdlKChsb25nKSBzd2FwX2hlYWRl
cik7DQorCXZtX2ludmFsaWRhdGVfdG90YWxtZW0oKTsNCiAJdW5sb2NrX2tl
cm5lbCgpOw0KIAlyZXR1cm4gZXJyb3I7DQogfQ0KIA0KIHZvaWQgc2lfc3dh
cGluZm8oc3RydWN0IHN5c2luZm8gKnZhbCkNCg==
--1897407998-355975241-986416914=:6489--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/