The patch titled Subject: mm/vmscan: remove unused lru_pages argument has been added to the -mm tree. Its filename is mm-vmscan-remove-unused-lru_pages-argument.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-remove-unused-lru_pages-argument.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-remove-unused-lru_pages-argument.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: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Subject: mm/vmscan: remove unused lru_pages argument Since 9092c71bb724 ("mm: use sc->priority for slab shrink targets") the argument 'unsigned long *lru_pages' passed around with no purpose. Remove it. Link: http://lkml.kernel.org/r/20190228083329.31892-4-aryabinin@xxxxxxxxxxxxx Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: William Kucharski <william.kucharski@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) --- a/mm/vmscan.c~mm-vmscan-remove-unused-lru_pages-argument +++ a/mm/vmscan.c @@ -2257,8 +2257,7 @@ enum scan_balance { * nr[2] = file inactive pages to scan; nr[3] = file active pages to scan */ static void get_scan_count(struct lruvec *lruvec, struct mem_cgroup *memcg, - struct scan_control *sc, unsigned long *nr, - unsigned long *lru_pages) + struct scan_control *sc, unsigned long *nr) { int swappiness = mem_cgroup_swappiness(memcg); struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat; @@ -2409,7 +2408,6 @@ static void get_scan_count(struct lruvec fraction[1] = fp; denominator = ap + fp + 1; out: - *lru_pages = 0; for_each_evictable_lru(lru) { int file = is_file_lru(lru); unsigned long lruvec_size; @@ -2525,7 +2523,6 @@ out: BUG(); } - *lru_pages += lruvec_size; nr[lru] = scan; } } @@ -2534,7 +2531,7 @@ out: * This is a basic per-node page freer. Used by both kswapd and direct reclaim. */ static void shrink_node_memcg(struct pglist_data *pgdat, struct mem_cgroup *memcg, - struct scan_control *sc, unsigned long *lru_pages) + struct scan_control *sc) { struct lruvec *lruvec = mem_cgroup_lruvec(pgdat, memcg); unsigned long nr[NR_LRU_LISTS]; @@ -2546,7 +2543,7 @@ static void shrink_node_memcg(struct pgl struct blk_plug plug; bool scan_adjusted; - get_scan_count(lruvec, memcg, sc, nr, lru_pages); + get_scan_count(lruvec, memcg, sc, nr); /* Record the original scan target for proportional adjustments later */ memcpy(targets, nr, sizeof(nr)); @@ -2751,7 +2748,6 @@ static bool shrink_node(pg_data_t *pgdat .pgdat = pgdat, .priority = sc->priority, }; - unsigned long node_lru_pages = 0; struct mem_cgroup *memcg; memset(&sc->nr, 0, sizeof(sc->nr)); @@ -2761,7 +2757,6 @@ static bool shrink_node(pg_data_t *pgdat memcg = mem_cgroup_iter(root, NULL, &reclaim); do { - unsigned long lru_pages; unsigned long reclaimed; unsigned long scanned; @@ -2798,8 +2793,7 @@ static bool shrink_node(pg_data_t *pgdat reclaimed = sc->nr_reclaimed; scanned = sc->nr_scanned; - shrink_node_memcg(pgdat, memcg, sc, &lru_pages); - node_lru_pages += lru_pages; + shrink_node_memcg(pgdat, memcg, sc); if (sc->may_shrinkslab) { shrink_slab(sc->gfp_mask, pgdat->node_id, @@ -3332,7 +3326,6 @@ unsigned long mem_cgroup_shrink_node(str .may_swap = !noswap, .may_shrinkslab = 1, }; - unsigned long lru_pages; sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) | (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK); @@ -3349,7 +3342,7 @@ unsigned long mem_cgroup_shrink_node(str * will pick up pages from other mem cgroup's as well. We hack * the priority and make it zero. */ - shrink_node_memcg(pgdat, memcg, &sc, &lru_pages); + shrink_node_memcg(pgdat, memcg, &sc); trace_mm_vmscan_memcg_softlimit_reclaim_end(sc.nr_reclaimed); _ Patches currently in -mm which might be from aryabinin@xxxxxxxxxxxxx are kasan-remove-use-after-scope-bugs-detection.patch mm-workingset-remove-unused-mapping-argument-in-workingset_eviction.patch mm-remove-zone_lru_lock-function-access-lru_lock-directly.patch mm-compaction-pass-pgdat-to-too_many_isolated-instead-of-zone.patch mm-vmscan-remove-unused-lru_pages-argument.patch