From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795987127; b=r0FOE6Lau+rMOOog44mF+Ujzuc2F9BPkjQrARV8JuF6XRoL0Ok4JrMitOuArfzLIgLR0 Jre8aLpWVEeLLai2fcUKZWLKgisVu2GCvXxcmLufgh0iKBBQ5/XdD9XZEKjAQf6YMFMNN HBGEAabcm5gMuGcjpqZoyEmCK05iuCnOJhOhuRf+Qae1N3ZzF1sE6j87nL5u8Kmtampul zZ5AzOUxUQEx/PKmzQWudWOB96X22VqypznVTdWo1oVrcoBVEiuQs8Yo1tDGEHczuwM/0 7jgJxOnT8NYV0eygeVnjvYZM95s+FPYlxrch6Cu9r8bF/qMbsjm2Cs6Csjd8Wo5wZTQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795987127; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=8pNd32jqHo4pNzV59xqwJ/rC6mgT7E+mTQk4tNUQXO8=; b=utXEjQbhgg4wLc4CNNnKDLtQ36JO+uRKzmHIVDszZSSonPie4Mu45PAIVQf96kQV3l3u YUQp8nk66Gkd++HLiznQJndRHPWU1Ql19TU434Cdm0iNrWxMkZkfFnBV+TVnxiL4wy5zY NWWEUfY1DoMFORF07SriM7gGo7YoTs2k6n8eXUmOqJ20MEpqTjY9tvBBfCYgmicaiVBXw YOmfDrOVuJAEgjL2gMHD0JInbh18/4sDLVaz1ccQ436I+n/zE1JkA++Yf+DHu+qkM3lI+ 7rvpNTMAAnGFqamDTekb2mBKBEZlA6MSohYRVz3bQWS3v5AqtWzAYdWs2CFLHVejFZg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=SLF6erxp; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F891606A329 for ; Sun, 29 Nov 2026 21:18:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=SLF6erxp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 886121F00919; Sun, 29 Nov 2026 21:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1795987126; bh=8pNd32jqHo4pNzV59xqwJ/rC6mgT7E+mTQk4tNUQXO8=; h=Date:To:From:In-Reply-To:References:Subject; b=SLF6erxpuI61PAbIqoiatzDA8Niqv8vu+R+x6pokRgisFW5KIvbqNoyD2dCh3kCt9 +DfXTS0RoHgVQQ3zSAY2uVs3QRmUT3eljdMzo6LDNAmaojL7fblFgGKL6dqzOAu/BL rdXu2B9gQnbt8Jzlc8Eq1FfyapT04riQv7kg9KFI= Date: Sun, 29 Nov 2026 13:18:46 -0800 To: mm-commits@vger.kernel.org,yuzhao@google.com,yuanchu@google.com, weixugc@google.com,shakeel.butt@linux.dev,ridong.chen@linux.dev, qi.zheng@linux.dev,mhocko@kernel.org,kasong@tencent.com,hannes@cmpxchg.org, david@kernel.org,baoquan.he@linux.dev,baolin.wang@linux.alibaba.com, baohua@kernel.org,axelrasmussen@google.com,mason@kernel.org, akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261129143759.96221-4-baohua@kernel.org> References: <20261129143759.96221-4-baohua@kernel.org> Subject: + mm-mglru-report-root-reclaim-to-memorypressure_level.patch added to mm-new branch Message-Id: <20261129211846.886121F00919@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: mm/mglru: report root reclaim to memory.pressure_level has been added to the -mm mm-new branch. Its filename is mm-mglru-report-root-reclaim-to-memorypressure_level.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mglru-report-root-reclaim-to-memorypressure_level.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next 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 via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Chris Mason Subject: mm/mglru: report root reclaim to memory.pressure_level Date: Sun, 29 Nov 2026 22:37:59 +0800 With MGLRU enabled, memory.pressure_level listeners on the cgroup v1 root can miss global reclaim: kswapd sends them no events, and direct reclaim only "critical" ones. On v1 the eventfds are only fed by vmpressure() calls with tree=true. shrink_node() makes that call after walking the memcgs, but it hands root reclaim to lru_gen_shrink_node() and returns first. The MGLRU walk only calls vmpressure() from shrink_one(), with tree=false, which has no consumer on v1. That leaves vmpressure_prio() in direct reclaim. The fix used here is to make the same subtree report at the end of the MGLRU walk of a node. Listeners for "medium" and "critical" can miss events they got before, since a vmpressure_prio() report is now averaged with the pages that the walk freed in the same window. Link: https://patch.msgid.link/20261129143759.96221-4-baohua@kernel.org Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Signed-off-by: Chris Mason Signed-off-by: Barry Song (Xiaomi) Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Andrew Morton Cc: Johannes Weiner Cc: Michal Hocko Cc: Qi Zheng Cc: Shakeel Butt Cc: Kairui Song Cc: Axel Rasmussen Cc: Yuanchu Xie Cc: Wei Xu Cc: Baoquan He Cc: Baolin Wang Cc: Ridong Chen Cc: Yu Zhao mm/vmscan.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/mm/vmscan.c~mm-mglru-report-root-reclaim-to-memorypressure_level +++ a/mm/vmscan.c @@ -5511,6 +5511,7 @@ static void lru_gen_shrink_lruvec(struct static void lru_gen_shrink_node(struct pglist_data *pgdat, struct scan_control *sc) { struct blk_plug plug; + unsigned long scanned = sc->nr_scanned; unsigned long reclaimed = sc->nr_reclaimed; VM_WARN_ON_ONCE(!root_reclaim(sc)); @@ -5545,6 +5546,11 @@ static void lru_gen_shrink_node(struct p clear_mm_walk(); blk_finish_plug(&plug); + + /* Record the subtree's reclaim efficiency */ + if (!sc->proactive) + vmpressure(sc->gfp_mask, sc->order, sc->target_mem_cgroup, true, + sc->nr_scanned - scanned, sc->nr_reclaimed - reclaimed); done: if (sc->nr_reclaimed > reclaimed) kswapd_try_clear_hopeless(pgdat, sc->order, sc->reclaim_idx); _ Patches currently in -mm which might be from mason@kernel.org are mm-swap-fix-large-swap-in-across-swap-file-extents.patch hugetlbfs-do-not-grow-a-sealed-file-in-mmap.patch mm-hugetlb-keep-surplus-folios-that-are-reserved.patch mm-hugetlb-fix-reservation-leak-on-min_size=-mounts.patch mm-cachestat-count-each-page-only-once.patch mm-cachestat-restart-the-walk-after-each-entry.patch percpu-queue-the-balance-work-on-an-unbound-workqueue.patch mm-vma-fix-uncharge-after-failed-stack-relocation.patch mm-mremap-apply-the-mmap-offset-limits-on-expansion.patch mm-mremap-respect-guard-gaps-on-in-place-expansion.patch mm-vma-make-brk-mappings-non-executable-under-mdwe.patch mm-hmm-refuse-secretmem-vmas-in-hmm_range_fault.patch mm-mglru-count-all-generations-as-evictable.patch mm-mglru-test-pg_lru-before-taking-a-folio-reference.patch mm-mglru-report-root-reclaim-to-memorypressure_level.patch