From 50fb2c0f1d04a7545841f7a3b18d9cb7e9754214 Mon Sep 17 00:00:00 2001 From: KOSAKI Motohiro Date: Wed, 7 Jan 2009 18:08:14 -0800 Subject: [PATCH] --- yaml --- r: 127580 b: refs/heads/master c: f89eb90e33fd4e4e0cc1a6d20afd63c5a561885a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/mm_inline.h | 19 ------------------- trunk/mm/vmscan.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index bfd89b48d127..32c72b46d25d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 670ec2f170301425fc4fdfa63d40652071fe85f6 +refs/heads/master: f89eb90e33fd4e4e0cc1a6d20afd63c5a561885a diff --git a/trunk/include/linux/mm_inline.h b/trunk/include/linux/mm_inline.h index 37ef13d0f01e..7fbb97267556 100644 --- a/trunk/include/linux/mm_inline.h +++ b/trunk/include/linux/mm_inline.h @@ -81,23 +81,4 @@ static inline enum lru_list page_lru(struct page *page) return lru; } -/** - * inactive_anon_is_low - check if anonymous pages need to be deactivated - * @zone: zone to check - * - * Returns true if the zone does not have enough inactive anon pages, - * meaning some active anon pages need to be deactivated. - */ -static inline int inactive_anon_is_low(struct zone *zone) -{ - unsigned long active, inactive; - - active = zone_page_state(zone, NR_ACTIVE_ANON); - inactive = zone_page_state(zone, NR_INACTIVE_ANON); - - if (inactive * zone->inactive_ratio < active) - return 1; - - return 0; -} #endif diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index 45983af1de3d..f75d924cb4f4 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -1291,6 +1291,26 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, pagevec_release(&pvec); } +/** + * inactive_anon_is_low - check if anonymous pages need to be deactivated + * @zone: zone to check + * + * Returns true if the zone does not have enough inactive anon pages, + * meaning some active anon pages need to be deactivated. + */ +static int inactive_anon_is_low(struct zone *zone) +{ + unsigned long active, inactive; + + active = zone_page_state(zone, NR_ACTIVE_ANON); + inactive = zone_page_state(zone, NR_INACTIVE_ANON); + + if (inactive * zone->inactive_ratio < active) + return 1; + + return 0; +} + static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan, struct zone *zone, struct scan_control *sc, int priority) {