The patch titled Subject: mm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec has been added to the -mm tree. Its filename is mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec.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: Muchun Song <songmuchun@xxxxxxxxxxxxx> Subject: mm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec lruvec_holds_page_lru_lock() doesn't check anything about locking and is used to check whether the page belongs to the lruvec. So rename it to page_matches_lruvec(). Link: https://lkml.kernel.org/r/20210417043538.9793-6-songmuchun@xxxxxxxxxxxxx Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: Roman Gushchin <guro@xxxxxx> Cc: Vladimir Davydov <vdavydov.dev@xxxxxxxxx> Cc: Xiongchun Duan <duanxiongchun@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/memcontrol.h | 8 ++++---- mm/vmscan.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/include/linux/memcontrol.h~mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec +++ a/include/linux/memcontrol.h @@ -1492,8 +1492,8 @@ static inline void unlock_page_lruvec_ir spin_unlock_irqrestore(&lruvec->lru_lock, flags); } -static inline bool lruvec_holds_page_lru_lock(struct page *page, - struct lruvec *lruvec) +/* Test requires a stable page->memcg binding, see page_memcg() */ +static inline bool page_matches_lruvec(struct page *page, struct lruvec *lruvec) { return lruvec_pgdat(lruvec) == page_pgdat(page) && lruvec_memcg(lruvec) == page_memcg(page); @@ -1504,7 +1504,7 @@ static inline struct lruvec *relock_page struct lruvec *locked_lruvec) { if (locked_lruvec) { - if (lruvec_holds_page_lru_lock(page, locked_lruvec)) + if (page_matches_lruvec(page, locked_lruvec)) return locked_lruvec; unlock_page_lruvec_irq(locked_lruvec); @@ -1518,7 +1518,7 @@ static inline struct lruvec *relock_page struct lruvec *locked_lruvec, unsigned long *flags) { if (locked_lruvec) { - if (lruvec_holds_page_lru_lock(page, locked_lruvec)) + if (page_matches_lruvec(page, locked_lruvec)) return locked_lruvec; unlock_page_lruvec_irqrestore(locked_lruvec, *flags); --- a/mm/vmscan.c~mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec +++ a/mm/vmscan.c @@ -2063,7 +2063,7 @@ static unsigned noinline_for_stack move_ * All pages were isolated from the same lruvec (and isolation * inhibits memcg migration). */ - VM_BUG_ON_PAGE(!lruvec_holds_page_lru_lock(page, lruvec), page); + VM_BUG_ON_PAGE(!page_matches_lruvec(page, lruvec), page); add_page_to_lru_list(page, lruvec); nr_pages = thp_nr_pages(page); nr_moved += nr_pages; _ Patches currently in -mm which might be from songmuchun@xxxxxxxxxxxxx are mm-memcontrol-fix-root_mem_cgroup-charging.patch mm-memcontrol-fix-page-charging-in-page-replacement.patch mm-memcontrol-bail-out-early-when-mm-in-get_mem_cgroup_from_mm.patch mm-memcontrol-remove-the-pgdata-parameter-of-mem_cgroup_page_lruvec.patch mm-memcontrol-simplify-lruvec_holds_page_lru_lock.patch mm-memcontrol-rename-lruvec_holds_page_lru_lock-to-page_matches_lruvec.patch mm-memcontrol-simplify-the-logic-of-objcg-pinning-memcg.patch mm-memcontrol-move-obj_cgroup_uncharge_pages-out-of-css_set_lock.patch mm-vmscan-remove-noinline_for_stack.patch mm-memory_hotplug-factor-out-bootmem-core-functions-to-bootmem_infoc.patch mm-hugetlb-introduce-a-new-config-hugetlb_page_free_vmemmap.patch mm-hugetlb-gather-discrete-indexes-of-tail-page.patch mm-hugetlb-free-the-vmemmap-pages-associated-with-each-hugetlb-page.patch mm-hugetlb-defer-freeing-of-hugetlb-pages.patch mm-hugetlb-alloc-the-vmemmap-pages-associated-with-each-hugetlb-page.patch mm-hugetlb-add-a-kernel-parameter-hugetlb_free_vmemmap.patch mm-memory_hotplug-disable-memmap_on_memory-when-hugetlb_free_vmemmap-enabled.patch mm-hugetlb-introduce-nr_free_vmemmap_pages-in-the-struct-hstate.patch