Commit bd12cbc7 authored by Andrew Morton's avatar Andrew Morton Committed by Dave Jones

[PATCH] remove vm_enough_memory double counting

From: Hugh Dickins <hugh@veritas.com>

Stop vm_enough_memory double counting total_swapcache_pages: it dates
from the days when we didn't free swap when freeing swapcache page.
parent 70fa2a42
......@@ -81,14 +81,6 @@ int vm_enough_memory(long pages)
free += nr_free_pages();
free += nr_swap_pages;
/*
* This double-counts: the nrpages are both in the
* page-cache and in the swapper space. At the same time,
* this compensates for the swap-space over-allocation
* (ie "nr_swap_pages" being too small).
*/
free += total_swapcache_pages;
/*
* The code below doesn't account for free space in the
* inode and dentry slab cache, slab cache fragmentation,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment