Skip to content

Commit 3c49de5

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge more fixes from Andrew Morton: "2 fixes" * emailed patches from Andrew Morton <[email protected]>: mm, vmscan: add cond_resched() into shrink_node_memcg() mm: workingset: fix NULL ptr in count_shadow_nodes
2 parents 8655639 + bd04173 commit 3c49de5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mm/vmscan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,8 @@ static void shrink_node_memcg(struct pglist_data *pgdat, struct mem_cgroup *memc
23542354
}
23552355
}
23562356

2357+
cond_resched();
2358+
23572359
if (nr_reclaimed < nr_to_reclaim || scan_adjusted)
23582360
continue;
23592361

mm/workingset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static unsigned long count_shadow_nodes(struct shrinker *shrinker,
348348
shadow_nodes = list_lru_shrink_count(&workingset_shadow_nodes, sc);
349349
local_irq_enable();
350350

351-
if (memcg_kmem_enabled()) {
351+
if (sc->memcg) {
352352
pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid,
353353
LRU_ALL_FILE);
354354
} else {

0 commit comments

Comments
 (0)