2005-10-21 22:43:56

by Hideo AOKI

[permalink] [raw]
Subject: [RFC][PATCH] OVERCOMMIT_GUESS considers reserved pages

The attached patch is the latest patch that OVERCOMMIT_GUESS in
__vm_enough_memory() considers reserved pages.

I think the patch is useful to avoid invoking oom killer, while
the patch is not the perfect solution of oom issues.

I checked that the patch works well when requirement of large
mount anonymous pages is occurred frequently. Otherwise the patch
can not fully avoid oom killer.

I think the reason is the following. Current OVERCOMMIT_GUESS
does not refer number of free pages, if the sum of page caches,
swap pages, and slab reclaim pages is greater than number of
required pages. However, when number of free pages is small,
the VM seems to get behind in page reclaiming and to invoke oom
killer.

Therefore, I want to change the code to check number of free
pages if number of required pages is relatively large. I think
ideally the best condition is when number of the required pages
exceeds number of reclaimable pages at one time. However, I don't
conceive implementation of such good condition yet.

Please let me know if you have any ideas about it.

Best regards,
Hide Aoki

---
Hideo Aoki, Hitachi Computer Products (America) Inc.


Attachments:
mm-overcommit_guess-considers-reserved-pages_v4.patch (5.74 kB)