don't allow free hugetlb count fall below reserved count
Subsystems (2)
PATCH 1/1 don't allow free hugetlb count fall below reserved count
With strict page reservation, I think kernel should enforce number of free hugetlb page don't fall below reserved count. Currently it is possible in the sysctl path. Add proper check in sysctl to disallow that.
mm/hugetlb.c renamed from mm/hugetlb.c.orig +1 -0
@@ -334,6 +334,7 @@return nr_huge_pages;spin_lock (&hugetlb_lock); + count =max (count, reserved_huge_pages);try_to_free_low (count);while (count < nr_huge_pages) {struct page *page =dequeue_huge_page (NULL ,0 );
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Kenneth W
With strict page reservation, I think kernel should enforce number of free hugetlb page don't fall below reserved count. Currently it is possible in the sysctl path. Add proper check in sysctl to disallow that.
Hmm.. maybe. I have no strong view either way. With this patch you're safer against accidentally taking hugepages away from a process which needs them. On the other hand, leaving it out gives a sysadmin more flexibility to free up normal memory at the expense of risking crashes for hugepage processes.
Ken - did you keep working on your alternative strict reservation patches? Last I recall they seemed to be converging on mine in all the points I thought really mattered, except that I hadn't updated mine to remove some of the problems you pointed out in it while developing your patches (e.g. unnecessarily taking a lock on reserve).
I'm actually on a very long leave at the moment, so I'm not really doing anything active. Those problems should be fixed at some point, though, either with patches to my approach, or by replacing it with yours.
Quoted 13 lines
Signed-off-by Ken Chen <[email protected]>mm/hugetlb.c renamed from mm/hugetlb.c.orig +1
-0@@ -334,6 +334,7 @@return nr_huge_pages;spin_lock (&hugetlb_lock); + count =max (count, reserved_huge_pages);try_to_free_low (count);while (count < nr_huge_pages) {struct page *page =dequeue_huge_page (NULL ,0 );
Signature · 10 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
David Gibson wrote on Thursday, March 30, 2006 4:42 PM
Quoted 10 lines
Ken - did you keep working on your alternative strict reservation patches? Last I recall they seemed to be converging on mine in all the points I thought really mattered, except that I hadn't updated mine to remove some of the problems you pointed out in it while developing your patches (e.g. unnecessarily taking a lock on reserve).
I'm actually on a very long leave at the moment, so I'm not really doing anything active. Those problems should be fixed at some point, though, either with patches to my approach, or by replacing it with yours.
Since andrew already merged your reservation patch for 2.6.17, I will shelf mine for now ...
I will work on the base kernel and add stuff to the current code.
- Ken
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>