Re: [PATCH] hugetlb: Fix pool resizing corner case

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dave Hansen <haveblue@...>
Cc: Andrew Morton <akpm@...>, <linux-mm@...>, <linux-kernel@...>
Date: Wednesday, October 3, 2007 - 2:33 pm

On Wed, 2007-10-03 at 10:40 -0700, Dave Hansen wrote:

The above hunk serves only to change the behavior of try_to_free_low()
so that rather than always freeing _at_least_ one huge page, it can
return without having freed any pages. 


I agree the name sucks, but this is a bugfix patch.


Maybe, but not really in-scope of what this patch is trying to
accomplish.


I agree, count is almost always a bad variable name :)


Not quite.  Count can never go below the number of reserved pages plus
pages allocated to MAP_PRIVATE mappings.  That number is computed by:
(resv + (total - free)).


The key is that we don't want to shrink the pool below the number of
pages we are committed to keeping around.  Before this patch, we only
accounted for the pages we plan to hand out (reserved huge pages) but
not the ones we've already handed out (total - free).  Does that make
sense?

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] hugetlb: Fix pool resizing corner case, Adam Litke, (Wed Oct 3, 11:47 am)
Re: [PATCH] hugetlb: Fix pool resizing corner case, Dave Hansen, (Wed Oct 3, 1:40 pm)
Re: [PATCH] hugetlb: Fix pool resizing corner case, Adam Litke, (Wed Oct 3, 2:33 pm)
Re: [PATCH] hugetlb: Fix pool resizing corner case, Dave Hansen, (Wed Oct 3, 2:59 pm)