mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
mm: make shrink_page_list with pages work from multiple zones
Shrink_page_list expects all pages come from a same zone but it's too limited to use. This patch removes the dependency so next patch can use shrink_page_list with pages from multiple zones. Change-Id: I34469b7f0a79f2b79e30e40033ba8b3e1dd5f2d0 Signed-off-by: Minchan Kim <minchan@kernel.org> Patch-mainline: linux-mm @ 9 May 2013 16:21:25 [vinmenon@codeaurora.org: trivial merge conflict fixes] Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
fc2a24ebb1
commit
21bb0e1a7b
1 changed files with 3 additions and 2 deletions
|
@ -829,7 +829,8 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|||
goto keep;
|
||||
|
||||
VM_BUG_ON(PageActive(page));
|
||||
VM_BUG_ON(page_zone(page) != zone);
|
||||
if (zone)
|
||||
VM_BUG_ON(page_zone(page) != zone);
|
||||
|
||||
sc->nr_scanned++;
|
||||
|
||||
|
@ -993,7 +994,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|||
*/
|
||||
if (page_is_file_cache(page) &&
|
||||
(!current_is_kswapd() ||
|
||||
!zone_is_reclaim_dirty(zone))) {
|
||||
(zone && !zone_is_reclaim_dirty(zone)))) {
|
||||
/*
|
||||
* Immediately reclaim when written back.
|
||||
* Similar in principal to deactivate_page()
|
||||
|
|
Loading…
Reference in a new issue