Re: [PATCH 2/3] mm: page allocator: Calculate a better estimate of NR_FREE_PAGES when memory is low and kswapd is awake

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

On Wed, Sep 01, 2010 at 03:16:59PM -0500, Christoph Lameter wrote:

The point is if the negative delta is greater than the current value of
nr_free_pages then nr_free_pages would underflow when delta is applied to it.


Lets say the reading at the start for nr_free_pages is 120 and the delta is
-20, then the estimated true value of nr_free_pages is 100. If we used your
logic, the estimate would be 120. Maybe I'm missing what you're saying.


I'm not seeing the relation. zone_nr_free_pages() is trying to
reconcile the reading from zone_page_state() with the contents of
vm_stat_diff[].


And I'd rather not hurt the paths for every counter unnecessarily
without good cause. I can move zone_nr_free_pages() to mm/vmstat.c if
you'd prefer?

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/3] mm: page allocator: Update free page count ..., Christoph Lameter, (Tue Aug 31, 11:17 am)
Re: [PATCH 2/3] mm: page allocator: Calculate a better est ..., Christoph Lameter, (Tue Aug 31, 11:20 am)
Re: [PATCH 3/3] mm: page allocator: Drain per-cpu lists af ..., Christoph Lameter, (Tue Aug 31, 11:26 am)
Re: [PATCH 2/3] mm: page allocator: Calculate a better est ..., Mel Gorman, (Wed Sep 1, 1:34 pm)