[PATCH] Use ZVC for free_pages
This is again simplifies some of the VM counter calculations through the use of the ZVC consolidated counters. [michal.k.k.piotrowski@gmail.com: build fix] Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c878538598
commit
d23ad42324
@@ -591,7 +591,7 @@ static unsigned int count_free_highmem_pages(void)
|
||||
|
||||
for_each_zone(zone)
|
||||
if (populated_zone(zone) && is_highmem(zone))
|
||||
cnt += zone->free_pages;
|
||||
cnt += zone_page_state(zone, NR_FREE_PAGES);
|
||||
|
||||
return cnt;
|
||||
}
|
||||
@@ -869,7 +869,7 @@ static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem)
|
||||
for_each_zone(zone) {
|
||||
meta += snapshot_additional_pages(zone);
|
||||
if (!is_highmem(zone))
|
||||
free += zone->free_pages;
|
||||
free += zone_page_state(zone, NR_FREE_PAGES);
|
||||
}
|
||||
|
||||
nr_pages += count_pages_for_highmem(nr_highmem);
|
||||
|
Reference in New Issue
Block a user