The patch titled Subject: mm-thp-make-deferred-split-shrinker-memcg-aware-v6 has been added to the -mm tree. Its filename is mm-thp-make-deferred-split-shrinker-memcg-aware-v6.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-thp-make-deferred-split-shrinker-memcg-aware-v6.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-make-deferred-split-shrinker-memcg-aware-v6.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: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> Subject: mm-thp-make-deferred-split-shrinker-memcg-aware-v6 Simplified deferred split queue dereference per Kirill Tkhai Link: http://lkml.kernel.org/r/1566496227-84952-5-git-send-email-yang.shi@xxxxxxxxxxxxxxxxx Signed-off-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Reviewed-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Qian Cai <cai@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) --- a/mm/huge_memory.c~mm-thp-make-deferred-split-shrinker-memcg-aware-v6 +++ a/mm/huge_memory.c @@ -2889,18 +2889,12 @@ void deferred_split_huge_page(struct pag static unsigned long deferred_split_count(struct shrinker *shrink, struct shrink_control *sc) { - struct deferred_split *ds_queue; struct pglist_data *pgdata = NODE_DATA(sc->nid); + struct deferred_split *ds_queue = &pgdata->deferred_split_queue; #ifdef CONFIG_MEMCG - if (!sc->memcg) { - ds_queue = &pgdata->deferred_split_queue; - return READ_ONCE(ds_queue->split_queue_len); - } - - ds_queue = &sc->memcg->deferred_split_queue; -#else - ds_queue = &pgdata->deferred_split_queue; + if (sc->memcg) + ds_queue = &sc->memcg->deferred_split_queue; #endif return READ_ONCE(ds_queue->split_queue_len); } @@ -2909,7 +2903,7 @@ static unsigned long deferred_split_scan struct shrink_control *sc) { struct pglist_data *pgdata = NODE_DATA(sc->nid); - struct deferred_split *ds_queue; + struct deferred_split *ds_queue = &pgdata->deferred_split_queue; unsigned long flags; LIST_HEAD(list), *pos, *next; struct page *page; @@ -2918,10 +2912,6 @@ static unsigned long deferred_split_scan #ifdef CONFIG_MEMCG if (sc->memcg) ds_queue = &sc->memcg->deferred_split_queue; - else - ds_queue = &pgdata->deferred_split_queue; -#else - ds_queue = &pgdata->deferred_split_queue; #endif spin_lock_irqsave(&ds_queue->split_queue_lock, flags); _ Patches currently in -mm which might be from yang.shi@xxxxxxxxxxxxxxxxx are mm-thp-extract-split_queue_-into-a-struct.patch mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch mm-shrinker-make-shrinker-not-depend-on-memcg-kmem.patch mm-shrinker-make-shrinker-not-depend-on-memcg-kmem-v6.patch mm-thp-make-deferred-split-shrinker-memcg-aware.patch mm-thp-make-deferred-split-shrinker-memcg-aware-v6.patch mm-account-deferred-split-thps-into-memavailable.patch