---1463784209-951819675-985558383=:27088
Content-Type: TEXT/PLAIN; charset=US-ASCII
Ugh, something was going screwy. Trying from a different machine.
------
The attached patch is against 2.4.1 and incorporates the following:
- More optimistic OOM checking, and slightly improved OOM-kill algorithm,
as per my previous patch.
- Accounting of reserved memory, allowing for...
- Non-overcommittal of memory if sysctl_overcommit_memory < 0, enforced
even for root if < -1 (as per old non-overcommittal patch for 2.3.99, but
fixed).
- Behaviour when sysctl_overcommit_memory == 0 or 1 is as per my original
patch (eg. soft-limited overcommittal and full overcommittal
respectively). Defaults to -1.
- If a process is larger than 4 times the free VM on the system, it is not
allowed to allocate or reserve any more, unless overcomittal is allowed as
above. Note that root may have less privilege to hog memory when
sysctl_overcommit_memory == 0 than when == -1.
- As part of the above, a new function vm_invalidate_totalmem() is
available which should be called whenever the total amount of VM changes -
at the moment this is done in sys_swap{on,off}(). This is to avoid having
to recalculate the amount of available memory and swap whenever an
allocation is needed. If someone knows a better way, let me know.
---1463784209-951819675-985558383=:27088
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="oom-patch.2.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0103252313020.27088@beryllium.chromatix.org.uk>
Content-Description:
Content-Disposition: attachment; filename="oom-patch.2.diff"
ZGlmZiAtdXIgLXggdmlhLXJoaW5lKiBsaW51eC0yLjQuMS5vcmlnL2ZzL2V4
ZWMuYyBsaW51eC9mcy9leGVjLmMNCi0tLSBsaW51eC0yLjQuMS5vcmlnL2Zz
L2V4ZWMuYwlUdWUgSmFuIDMwIDA3OjEwOjU4IDIwMDENCisrKyBsaW51eC9m
cy9leGVjLmMJU3VuIE1hciAyNSAxNzowNTowMyAyMDAxDQpAQCAtMzg1LDE5
ICszODUsMjcgQEANCiBzdGF0aWMgaW50IGV4ZWNfbW1hcCh2b2lkKQ0KIHsN
CiAJc3RydWN0IG1tX3N0cnVjdCAqIG1tLCAqIG9sZF9tbTsNCisJc3RydWN0
IHRhc2tfc3RydWN0ICogdHN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LXgg
dmlhLXJoaW5lKiBsaW51eC0yLjQuMS5vcmlnL2ZzL3Byb2MvcHJvY19taXNj
LmMgbGludXgvZnMvcHJvYy9wcm9jX21pc2MuYw0KLS0tIGxpbnV4LTIuNC4x
Lm9yaWcvZnMvcHJvYy9wcm9jX21pc2MuYwlUdWUgTm92ICA3IDE5OjA4OjA5
IDIwMDANCisrKyBsaW51eC9mcy9wcm9jL3Byb2NfbWlzYy5jCVN1biBNYXIg
MjUgMTY6NTc6MDcgMjAwMQ0KQEAgLTE3NSw3ICsxNzUsOSBAQA0KICAgICAg
ICAgICAgICAgICAiTG93VG90YWw6ICAgICAlOGx1IGtCXG4iDQogICAgICAg
ICAgICAgICAgICJMb3dGcmVlOiAgICAgICU4bHUga0JcbiINCiAgICAgICAg
ICAgICAgICAgIlN3YXBUb3RhbDogICAgJThsdSBrQlxuIg0KLSAgICAgICAg
ICAgICAgICAiU3dhcEZyZWU6ICAgICAlOGx1IGtCXG4iLA0KKyAgICAgICAg
ICAgICAgICAiU3dhcEZyZWU6ICAlOGx1IGtCXG4iDQorICAgICAgICAgICAg
ICAgICJWTVRvdGFsOiAgICU4bHUga0JcbiINCisgICAgICAgICAgICAgICAg
IlZNUmVzZXJ2ZWQ6JThsdSBrQlxuIiwNCiAgICAgICAgICAgICAgICAgSyhp
LnRvdGFscmFtKSwNCiAgICAgICAgICAgICAgICAgSyhpLmZyZWVyYW0pLA0K
ICAgICAgICAgICAgICAgICBLKGkuc2hhcmVkcmFtKSwNCkBAIC0xOTAsNyAr
MTkyLDkgQEANCiAgICAgICAgICAgICAgICAgSyhpLnRvdGFscmFtLWkudG90
YWxoaWdoKSwNCiAgICAgICAgICAgICAgICAgSyhpLmZyZWVyYW0taS5mcmVl
aGlnaCksDQogICAgICAgICAgICAgICAgIEsoaS50b3RhbHN3YXApLA0KLSAg
ICAgICAgICAgICAgICBLKGkuZnJlZXN3YXApKTsNCisgICAgICAgICAgICAg
ICAgSyhpLmZyZWVzd2FwKSwNCisg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g
ICAgICAgfQ0KKyAgICAgICAvKiBpZiBQRl9WRk9SSyBpcyBzZXQgd2UncmUg
anVzdCBib3Jyb3dpbmcgdGhlIFZNIHNvIGRvbid0IHRvdWNoIGl0ICovDQor
ICAgICAgIGlmIChyZXNvdXJjZSA9PSBSTElNSVRfU1RBQ0sgJiYgISh0c2st
PmZsYWdzICYgUEZfVkZPUkspKSB7DQorICAgICAgICAgICAgICAgbG9uZyBu
ZXdwYWdlcyA9DQorICAgICAgICAgICAgICAgICAgICAgICAoKGxvbmcpKG5l
d19ybGltLnJsaW1fY3VyIC0gb2xkX3JsaW0tPnJsaW1fY3VyKSA+Pg0KKyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQQUdFX1NISUZUKTsNCisg
ICAgICAgICAgICAgICBpZiAobmV3cGFnZXMgPiAwICYmICF2bV9lbm91Z2hf
bWVtb3J5KG5ld3BhZ2VzKSkNCisgICAgICAgICAgICAgICAgICAgICAgIC8q
IFdlIHNob3VsZCByZWFsbHkgcmV0dXJuIEVBR0FJTiBvciBFTk9NRU0uICov
DQorICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVQRVJNOw0KKyAg
ICAgICAgICAgICAgIGlmIChuZXdwYWdlcyA8IDApDQorICAgICAgICAgICAg
ICAgICAgICAgICB2bV9yZWxlYXNlX21lbW9yeSgtbmV3cGFnZXMpOw0KIAl9
DQogCSpvbGRfcmxpbSA9IG5ld19ybGltOw0KIAlyZXR1cm4gMDsNCmRpZmYg
LXVyIC14IHZpYS1yaGluZSogbGludXgtMi40LjEub3JpZy9tbS9tbWFwLmMg
bGludXgvbW0vbW1hcC5jDQotLS0gbGludXgtMi40LjEub3JpZy9tbS9tbWFw
LmMJTW9uIEphbiAyOSAxNjoxMDo0MSAyMDAxDQorKysgbGludXgvbW0vbW1h
cC5jCVN1biBNYXIgMjUgMjE6MDY6MDggMjAwMQ0KQEAgLTM2LDEyICszNiw0
MiBAQA0KIAlfX1MwMDAsIF9fUzAwMSw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IEBADQogb3V0Og0KIAlpZiAoc3dhcF9oZWFk
ZXIpDQogCQlmcmVlX3BhZ2UoKGxvbmcpIHN3YXBfaGVhZGVyKTsNCisJdm1f
aW52YWxpZGF0ZV90b3RhbG1lbSgpOw0KIAl1bmxvY2tfa2VybmVsKCk7DQog
CXJldHVybiBlcnJvcjsNCiB9DQo=
---1463784209-951819675-985558383=:27088--
-
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/