The patch titled Subject: mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix has been added to the -mm tree. Its filename is mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix As per Roman's suggestion, rename "root" to "target_memcg" to avoid confusion with the global cgroup root, root_mem_cgroup. Link: http://lkml.kernel.org/r/20191025143640.GA386981@xxxxxxxxxxx Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Roman Gushchin <guro@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) --- a/mm/vmscan.c~mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix +++ a/mm/vmscan.c @@ -2724,16 +2724,16 @@ static bool pgdat_memcg_congested(pg_dat static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) { - struct mem_cgroup *root = sc->target_mem_cgroup; + struct mem_cgroup *target_memcg = sc->target_mem_cgroup; struct mem_cgroup *memcg; - memcg = mem_cgroup_iter(root, NULL, NULL); + memcg = mem_cgroup_iter(target_memcg, NULL, NULL); do { struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat); unsigned long reclaimed; unsigned long scanned; - switch (mem_cgroup_protected(root, memcg)) { + switch (mem_cgroup_protected(target_memcg, memcg)) { case MEMCG_PROT_MIN: /* * Hard protection. @@ -2777,13 +2777,13 @@ static void shrink_node_memcgs(pg_data_t sc->nr_scanned - scanned, sc->nr_reclaimed - reclaimed); - } while ((memcg = mem_cgroup_iter(root, memcg, NULL))); + } while ((memcg = mem_cgroup_iter(target_memcg, memcg, NULL))); } static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) { struct reclaim_state *reclaim_state = current->reclaim_state; - struct mem_cgroup *root = sc->target_mem_cgroup; + struct mem_cgroup *target_memcg = sc->target_mem_cgroup; unsigned long nr_reclaimed, nr_scanned; bool reclaimable = false; @@ -2801,7 +2801,7 @@ again: } /* Record the subtree's reclaim efficiency */ - vmpressure(sc->gfp_mask, root, true, + vmpressure(sc->gfp_mask, target_memcg, true, sc->nr_scanned - nr_scanned, sc->nr_reclaimed - nr_reclaimed); @@ -2857,7 +2857,7 @@ again: */ if (cgroup_reclaim(sc) && writeback_throttling_sane(sc) && sc->nr.dirty && sc->nr.dirty == sc->nr.congested) - set_memcg_congestion(pgdat, root, true); + set_memcg_congestion(pgdat, target_memcg, true); /* * Stall direct reclaim for IO completions if underlying BDIs @@ -2866,7 +2866,8 @@ again: * the LRU too quickly. */ if (!sc->hibernation_mode && !current_is_kswapd() && - current_may_throttle() && pgdat_memcg_congested(pgdat, root)) + current_may_throttle() && + pgdat_memcg_congested(pgdat, target_memcg)) wait_iff_congested(BLK_RW_ASYNC, HZ/10); if (should_continue_reclaim(pgdat, sc->nr_reclaimed - nr_reclaimed, _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are mm-rate-limit-allocation-failure-warnings-more-aggressively.patch mm-memcontrol-fix-network-errors-from-failing-__gfp_atomic-charges.patch mm-memcontrol-remove-dead-code-from-memory_max_write.patch mm-memcontrol-try-harder-to-set-a-new-memoryhigh.patch mm-drop-mmap_sem-before-calling-balance_dirty_pages-in-write-fault.patch mm-vmscan-simplify-lruvec_lru_size.patch mm-clean-up-and-clarify-lruvec-lookup-procedure.patch mm-vmscan-move-inactive_list_is_low-swap-check-to-the-caller.patch mm-vmscan-naming-fixes-global_reclaim-and-sane_reclaim.patch mm-vmscan-replace-shrink_node-loop-with-a-retry-jump.patch mm-vmscan-turn-shrink_node_memcg-into-shrink_lruvec.patch mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part.patch mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix.patch mm-vmscan-harmonize-writeback-congestion-tracking-for-nodes-memcgs.patch