Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127580
b: refs/heads/master
c: f89eb90
h: refs/heads/master
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Jan 8, 2009
1 parent 0ab1ec0 commit 50fb2c0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 670ec2f170301425fc4fdfa63d40652071fe85f6
refs/heads/master: f89eb90e33fd4e4e0cc1a6d20afd63c5a561885a
19 changes: 0 additions & 19 deletions trunk/include/linux/mm_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 50fb2c0

Please sign in to comment.