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=1796102716; b=H+bTB52Ccax6MfzLLACEOiS0SBt9DD/0OFhCCl4u3vUSMS+9sSzjZuVLJwSKLPT7KnsC h9G3Aav3LV5lLnMZO946JrrXYKWm6H9IuQqY1gP2B1DKoRKIqMVExeA5qXVazLsR/4V/v jMJO1wZBmLwZUF/Cg/R3rq8a/FbrweZDECNtLBh75KR3ipJi8aDJeEvYZgPNGwmECdpng PZohKWpk2vBzQEZqNjD0OGkv2sLO2HU1uDWv7f+RIMTg3Zhqssgl3Qt1nxBgneTW/1b0v gpWzr8NQghPIevE0S6RArwVnYdIvOu16FIaOsE4fJz2hGsM8UKTPlBs+2iAF6WthKLA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796102716; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=NZ6Fci9wjGl0jSRsK3TU7l8Z9CLMb4cfYHKL/SV91SU=; b=APFBR5TkBtNqJB24cvvppeRXK13U0Qkv8zoSfnl1BF38f0Ym7XRrMLRmh1KlL0UCOmfh 8XrqwN1lAq/z1N2GGu06qIr0kJb2Rs5tDjBcKOu8zlltusEukOZqffMJBTR3aIIa3hegj 58+KWFiKX1EGm+gFfybYbYo+nzd66ggJz9zmgg/4A1MyZOhWWHdzA9vGiDcX8Vkp6POJj kTT+6MrQt00sR73f0JEEGWPZWFI3WJtEbLy8iBq2nOPG3/DcuFH0RjPNHQEhRRRaee6ed HS09J7sUdJBzsJv7PvgE5tv6hUTJ/C78OmRYGwqkwkipjQyuKGHBIvGTjaXmkpSRqWg== 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=WS5qKq4T; 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 963A7606A31A for ; Tue, 1 Dec 2026 05:25:16 +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=WS5qKq4T Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16DC11F00893; Tue, 1 Dec 2026 05:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796102716; bh=NZ6Fci9wjGl0jSRsK3TU7l8Z9CLMb4cfYHKL/SV91SU=; h=Date:To:From:In-Reply-To:References:Subject; b=WS5qKq4T5QWWFtovvDRrUKpXEUlGZPFQRpun6hOWtYfS4qbOM09i/zLoz0TlKtYU5 A3ktQyrkkKZlPYinMoKaFR7USLjjLWPhJ0bjY59Q+RtKqbGXsYIGgKxLTPDvTJCeSa a34kBkElr4xIEqNhS4eblq063JGHY6H/sMgWhdM4= Date: Mon, 30 Nov 2026 21:25:15 -0800 To: mm-commits@vger.kernel.org,ziy@nvidia.com,willy@infradead.org, vbabka@kernel.org,usama.arif@linux.dev,surenb@google.com, shakeel.butt@linux.dev,ryan.roberts@arm.com,roman.gushchin@linux.dev, nico.pache@linux.dev,muchun.song@linux.dev,mhocko@kernel.org, liam@infradead.org,lance.yang@linux.dev,kas@kernel.org,hannes@cmpxchg.org, escape@deepseek.com,dev.jain@arm.com,david@kernel.org, daejun7.park@samsung.com,brendan.jackman@linux.dev, baolin.wang@linux.alibaba.com,baohua@kernel.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: References: Subject: + mm-huge_memory-set-memcg_data-before-a-split-page-leaves-the-folio-fix.patch added to mm-new branch Message-Id: <20261201052516.16DC11F00893@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/huge_memory: explain memcg_data ordering during a folio split has been added to the -mm mm-new branch. Its filename is mm-huge_memory-set-memcg_data-before-a-split-page-leaves-the-folio-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_memory-set-memcg_data-before-a-split-page-leaves-the-folio-fix.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: Andrew Morton Subject: mm/huge_memory: explain memcg_data ordering during a folio split Date: Mon, 30 Nov 2026 21:14:59 -0800 update comment, per Zi Link: https://lore.kernel.org/r/DMMKKOIGA9UJ.353PCUUMFLCCJ@nvidia.com Signed-off-by: Andrew Morton Cc: Daejun Park Cc: Zi Yan Cc: Baolin Wang Cc: Barry Song Cc: Brendan Jackman Cc: David Hildenbrand Cc: Dev Jain Cc: Johannes Weiner Cc: Kiryl Shutsemau Cc: Lance Yang Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Cc: Nico Pache Cc: Roman Gushchin Cc: Ryan Roberts Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Tao Yi Cc: Usama Arif Cc: Vlastimil Babka mm/huge_memory.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/mm/huge_memory.c~mm-huge_memory-set-memcg_data-before-a-split-page-leaves-the-folio-fix +++ a/mm/huge_memory.c @@ -3860,9 +3860,10 @@ static void __split_folio_to_order(struc #ifdef CONFIG_MEMCG /* - * In the first tail page, memcg_data still holds - * folio->_nr_pages. Lockless PFN walkers (page_cgroup_ino(), - * page_owner) read memcg_data once the page is not a tail. + * clear_compound_head() makes new_folio visible as a folio to + * lockless, reference-free PFN walkers. In the first tail page, + * memcg_data overlays folio->_nr_pages. Set it before clearing + * compound_head so readers cannot mistake _nr_pages for an objcg. */ new_folio->memcg_data = folio->memcg_data; #endif _ Patches currently in -mm which might be from akpm@linux-foundation.org are mm-vma-drop-mm-asynchronously-in-vma_start_read-fix.patch mm-vma-drop-mm-asynchronously-in-vma_start_read-fix-2.patch kselftest-mm-rename-read_pmd_pagesize-to-pmd_psize-fix.patch selftests-mm-check-madv_cold-and-madv_pageout-on-partly-advised-thps-fix.patch selftests-mm-add-uffdio_move-huge-zeropage-pmd-regression-test-fix.patch selftests-mm-allocate-nr_pages-based-on-pmd-size-for-uffd-pmd_move-tests-fix.patch selftests-mm-retain-move-pmd-coverage-and-verify-huge-pmds.patch lib-test_xarray-check-unused-spare-node-after-range-creation.patch mm-memory-failure-dont-unpoison-a-leaked-raw_hwp_unreliable-folio-fix.patch mm-hugetlb-delay-anon-folio-rmap-removal-until-after-the-tlb-flush-fix.patch mm-hugetlb-delay-anon-folio-rmap-removal-until-after-the-tlb-flush-fix-2.patch mm-vmstat_kunit-add-synthetic-benchmark-for-mm-stats-fix.patch mm-prevent-pre-content-bypass-through-mremap-and-remap_file_pages.patch afs-do-not-put-error-pointer-after-address-lookup-failure.patch selftests-mm-check-that-fsync-reports-hard-poisoned-dirty-page-cache.patch selftests-mm-memory-failure-truncate-poisoned-fuse-page-cache-before-teardown.patch selftests-mm-memory-failure-skip-poisoned-dirty-page-cache-on-nilfs2.patch selftest-mm-memory-failure-keep-page-cache-files-linked-until-cleanup.patch selftest-mm-memory-failure-keep-page-cache-files-linked-until-cleanup-fix.patch selftests-mm-memory-failure-skip-hard-dirty-page-cache-test-on-cephfs.patch selftests-mm-memory-failure-close-dirty-page-cache-files-before-unlinking-them.patch selftests-mm-memory-failure-extend-page-cache-test-files-with-pwrite.patch selftests-mm-memory-failure-write-the-whole-page-cache-test-file-for-omfs.patch selftests-mm-memory-failure-accept-eio-from-close-after-poisoning-dirty-data.patch alloc_tag-introduce-ioctls-to-toggle-allocation-tracepoints-fix-fix.patch alloc_tag-introduce-ioctls-to-toggle-allocation-tracepoints-fix.patch mm-vmscan-scope-freeze-writeback-skip-to-the-reclaim-target.patch mm-vmscan-scope-freeze-writeback-skip-to-the-reclaim-target-fix.patch mm-hmm-refuse-secretmem-vmas-in-hmm_range_fault-fix.patch mm-huge_memory-set-memcg_data-before-a-split-page-leaves-the-folio-fix.patch ocfs2-unregister-the-jbd2-shrinker-before-journal-shutdown.patch ipc-msg-clamp-negative-msg_info-usage-counts.patch squashfs-fix-leaked-page-locks-when-page-actor-allocation-fails-fix.patch ocfs2-skip-network-flush-when-no-domain-handlers-are-registered.patch selftests-ptrace-check-that-ptrace_set_syscall_info-rejects-invalid-error-values-fix.patch lib-atomic64-separate-hashed-locks-by-smp-cache-line.patch nvdimm-btt-separate-map-locks-by-smp-cache-line.patch percpu_ref-replace-the-global-switch-lock-with-hashed-locks-fix.patch kernfs-fix-a-race-on-the-count-of-mmapped-files.patch kernfs-path-lookup-scalability-improvements.patch kernfs-make-getattr-lockless.patch fs-move-kernfs_mode_permission-into-the-vfs.patch fs-share-the-dac-override-checks-of-generic_permission-and-generic_mode_permission.patch kernfs-open-and-close-plain-files-without-the-open-file-mutex.patch kernfs-open-and-close-files-with-release-without-the-open-file-mutex.patch kernfs-take-kernfs_rwsem-once-per-batch-of-entries-in-readdir.patch kernfs-cache-symlink-bodies-and-follow-symlinks-in-rcu-walk.patch drivers-media-v4l2-core-v4l2-vp9c-reduce-inlining.patch