[PATCH] pagecache accounting speedup
From: Alex Tomas <bzzz@tmi.comex.ru> This is the second half of the vm_enough_memory() speedup. When overcommit_memory != 1, vm_enough_memory() calls get_page_state() to calculate the amount of used pagecache. It does this on every call to sys_brk(). get_page_state() is really expensive on SMP. So the patch arranges for pagecache accounting to be in a global atomic_t, with per-cpu batching and approximate accounting to amortise the cost of the global atomic. The nr_pagecache field of /proc/vmstat is removed.
Showing
Please register or sign in to comment