linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix MADV_COLLAPSE issue if THP settings are disabled
@ 2025-05-29  8:23 Baolin Wang
  2025-05-29  8:23 ` [PATCH 1/2] mm: huge_memory: disallow hugepages if the system-wide THP sysfs " Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Baolin Wang @ 2025-05-29  8:23 UTC (permalink / raw)
  To: akpm, hughd, david
  Cc: lorenzo.stoakes, Liam.Howlett, npache, ryan.roberts, dev.jain,
	ziy, baolin.wang, linux-mm, linux-fsdevel, linux-kernel

As we discussed in the previous thread [1], the MADV_COLLAPSE will ignore
the system-wide anon/shmem THP sysfs settings, which means that even though
we have disabled the anon/shmem THP configuration, MADV_COLLAPSE will still
attempt to collapse into a anon/shmem THP. This violates the rule we have
agreed upon: never means never. This patch set will address this issue.

[1] https://lore.kernel.org/all/1f00fdc3-a3a3-464b-8565-4c1b23d34f8d@linux.alibaba.com/

Baolin Wang (2):
  mm: huge_memory: disallow hugepages if the system-wide THP sysfs
    settings are disabled
  mm: shmem: disallow hugepages if the system-wide shmem THP sysfs
    settings are disabled

 include/linux/huge_mm.h | 23 +++++++++++++++++++----
 mm/huge_memory.c        |  2 +-
 mm/shmem.c              | 12 ++++++------
 3 files changed, 26 insertions(+), 11 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2025-05-30 10:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29  8:23 [PATCH 0/2] fix MADV_COLLAPSE issue if THP settings are disabled Baolin Wang
2025-05-29  8:23 ` [PATCH 1/2] mm: huge_memory: disallow hugepages if the system-wide THP sysfs " Baolin Wang
2025-05-29 15:10   ` Zi Yan
2025-05-30  1:51     ` Baolin Wang
2025-05-30  2:04       ` Zi Yan
2025-05-30  2:21         ` Baolin Wang
2025-05-30  2:22           ` Zi Yan
2025-05-29  8:23 ` [PATCH 2/2] mm: shmem: disallow hugepages if the system-wide shmem " Baolin Wang
2025-05-29 15:21   ` Zi Yan
2025-05-30  1:58     ` Baolin Wang
2025-05-30  2:17       ` Zi Yan
2025-05-30  2:32         ` Baolin Wang
2025-05-30  2:35           ` Zi Yan
2025-05-30  2:39             ` Baolin Wang
2025-05-30  8:04 ` [PATCH 0/2] fix MADV_COLLAPSE issue if THP " Ryan Roberts
2025-05-30  8:44   ` David Hildenbrand
2025-05-30  8:47     ` Lorenzo Stoakes
2025-05-30  8:52       ` David Hildenbrand
2025-05-30  9:07         ` Ryan Roberts
2025-05-30  9:14           ` Lorenzo Stoakes
2025-05-30  8:59     ` Ryan Roberts
2025-05-30  9:10       ` David Hildenbrand
2025-05-30  9:16         ` David Hildenbrand
2025-05-30  9:34           ` Lorenzo Stoakes
2025-05-30  9:52           ` Baolin Wang
2025-05-30 10:45             ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).