summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-03 03:48:11 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-03 03:48:11 +0100
commit3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (patch)
tree51945ac515d7b31c81e79adcd11e78baebeb1daa
parentkbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled (diff)
parentmm, vmscan: add cond_resched() into shrink_node_memcg() (diff)
downloadlinux-3c49de52d5647cda8b42c4255cf8a29d1e22eff5.tar.xz
linux-3c49de52d5647cda8b42c4255cf8a29d1e22eff5.zip
Merge branch 'akpm' (patches from Andrew)
Merge more fixes from Andrew Morton: "2 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm, vmscan: add cond_resched() into shrink_node_memcg() mm: workingset: fix NULL ptr in count_shadow_nodes
-rw-r--r--mm/vmscan.c2
-rw-r--r--mm/workingset.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 76fda2268148..d75cdf360730 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2354,6 +2354,8 @@ static void shrink_node_memcg(struct pglist_data *pgdat, struct mem_cgroup *memc
}
}
+ cond_resched();
+
if (nr_reclaimed < nr_to_reclaim || scan_adjusted)
continue;
diff --git a/mm/workingset.c b/mm/workingset.c
index 617475f529f4..fb1f9183d89a 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -348,7 +348,7 @@ static unsigned long count_shadow_nodes(struct shrinker *shrinker,
shadow_nodes = list_lru_shrink_count(&workingset_shadow_nodes, sc);
local_irq_enable();
- if (memcg_kmem_enabled()) {
+ if (sc->memcg) {
pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid,
LRU_ALL_FILE);
} else {