mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mm: fix memcg_data reads during a THP split
@ 2026-11-04  9:59 Daejun Park via B4 Relay
  2026-11-04  9:59 ` [PATCH 1/2] mm/huge_memory: set memcg_data before a split page leaves the folio Daejun Park via B4 Relay
  2026-11-04  9:59 ` [PATCH 2/2] mm/page_owner: also check PageTail before reading memcg_data Daejun Park via B4 Relay
  0 siblings, 2 replies; 6+ messages in thread
From: Daejun Park via B4 Relay @ 2026-11-04  9:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tao Yi, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Muchun Song, David Hildenbrand, Zi Yan,
	Matthew Wilcox, Baolin Wang, Liam R. Howlett, Nico Pache,
	Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif,
	Kiryl Shutsemau, Vlastimil Babka, Suren Baghdasaryan,
	Brendan Jackman, linux-mm, cgroups, linux-kernel, stable,
	Daejun Park

Tao Yi reported an oops in page_cgroup_ino() while reading
/proc/kpagecgroup and traced it to the THP split in an RFC [1]. The
RFC skips frozen folios in the reader. Patch 1 moves the memcg_data
copy in the split instead. Patch 2 orders the same loads in
page_owner and needs patch 1.

Charged large kmalloc pages are frozen, so the RFC would report them
as uncharged. My review of the RFC [2] got no reply. Tested on x86_64
with KASAN, see patch 1.

[1] https://lore.kernel.org/all/20260907124001.1544655-1-escape@deepseek.com/
[2] https://lore.kernel.org/all/20261028040418epcms2p7ac0f584cdfdc6a0ea9b7f20eadeada3d@epcms2p7/

---
Daejun Park (2):
      mm/huge_memory: set memcg_data before a split page leaves the folio
      mm/page_owner: also check PageTail before reading memcg_data

 mm/huge_memory.c | 17 +++++++++++++----
 mm/memcontrol.c  |  9 ++++++++-
 mm/page_owner.c  |  7 +++++++
 3 files changed, 28 insertions(+), 5 deletions(-)
---
base-commit: a13b500946e5dc467976838572b8ddd2fd777ca7
change-id: 20261028-kpagecgroup-split-8a749c6ee27e

Best regards,
-- 
Daejun Park <daejun7.park@samsung.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-05  1:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04  9:59 [PATCH 0/2] mm: fix memcg_data reads during a THP split Daejun Park via B4 Relay
2026-11-04  9:59 ` [PATCH 1/2] mm/huge_memory: set memcg_data before a split page leaves the folio Daejun Park via B4 Relay
2026-11-04 16:33   ` Zi Yan
     [not found]   ` <CGME20261104163327epcas2p1f056cd220dc0d3e40e6fcea082f01b74@epcms2p6>
2026-11-05  1:06     ` Daejun Park
2026-11-04  9:59 ` [PATCH 2/2] mm/page_owner: also check PageTail before reading memcg_data Daejun Park via B4 Relay
2026-11-04 16:38   ` Zi Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®