[PATCH] page freeing function for swsusp
Software suspend needs a way of forcing page reclaim, up to the point where 50% of memory is free. This patch implements a function to do that: int shrink_all_memory(int nr_pages); Will attempt to reclaim `nr_pages' pages and return them to the free pages pool. It returns the number of pages which it actually freed. If called with a "large" number of pages it will only free up to a few hundred, so the caller needs to loop on it. If it returns zero then there is no point in calling it again.
Showing
Please register or sign in to comment