Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308894
b: refs/heads/master
c: c3c787e
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed May 29, 2012
1 parent 59abce5 commit 70eca32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: 86493009d3b7e51eee38575f9537b754f5b6c536
refs/heads/master: c3c787e8c38557ccf44c670d73aebe630a2b1479
18 changes: 4 additions & 14 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,16 @@ static bool global_reclaim(struct scan_control *sc)
{
return !sc->target_mem_cgroup;
}

static bool scanning_global_lru(struct mem_cgroup_zone *mz)
{
return !mz->mem_cgroup;
}
#else
static bool global_reclaim(struct scan_control *sc)
{
return true;
}

static bool scanning_global_lru(struct mem_cgroup_zone *mz)
{
return true;
}
#endif

static struct zone_reclaim_stat *get_reclaim_stat(struct mem_cgroup_zone *mz)
{
if (!scanning_global_lru(mz))
if (!mem_cgroup_disabled())
return mem_cgroup_get_reclaim_stat(mz->mem_cgroup, mz->zone);

return &mz->zone->reclaim_stat;
Expand All @@ -168,7 +158,7 @@ static struct zone_reclaim_stat *get_reclaim_stat(struct mem_cgroup_zone *mz)
static unsigned long zone_nr_lru_pages(struct mem_cgroup_zone *mz,
enum lru_list lru)
{
if (!scanning_global_lru(mz))
if (!mem_cgroup_disabled())
return mem_cgroup_zone_nr_lru_pages(mz->mem_cgroup,
zone_to_nid(mz->zone),
zone_idx(mz->zone),
Expand Down Expand Up @@ -1589,7 +1579,7 @@ static int inactive_anon_is_low(struct mem_cgroup_zone *mz)
if (!total_swap_pages)
return 0;

if (!scanning_global_lru(mz))
if (!mem_cgroup_disabled())
return mem_cgroup_inactive_anon_is_low(mz->mem_cgroup,
mz->zone);

Expand Down Expand Up @@ -1628,7 +1618,7 @@ static int inactive_file_is_low_global(struct zone *zone)
*/
static int inactive_file_is_low(struct mem_cgroup_zone *mz)
{
if (!scanning_global_lru(mz))
if (!mem_cgroup_disabled())
return mem_cgroup_inactive_file_is_low(mz->mem_cgroup,
mz->zone);

Expand Down

0 comments on commit 70eca32

Please sign in to comment.