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

Changes from v1:
 - Update the commit message, per Zi.
 - Add Zi's reviewed tag. Thanks.
 - Update the shmem logic.

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              |  6 +++---
 3 files changed, 23 insertions(+), 8 deletions(-)

-- 
2.43.5



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

end of thread, other threads:[~2025-06-13 14:42 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05  8:00 [PATCH v2 0/2] fix MADV_COLLAPSE issue if THP settings are disabled Baolin Wang
2025-06-05  8:00 ` [PATCH v2 1/2] mm: huge_memory: disallow hugepages if the system-wide THP sysfs " Baolin Wang
2025-06-06 16:49   ` Dev Jain
2025-06-06 18:47     ` Dev Jain
2025-06-09  5:57       ` Baolin Wang
2025-06-07 11:55   ` Lorenzo Stoakes
2025-06-07 12:21     ` Lorenzo Stoakes
2025-06-09  6:18       ` Baolin Wang
2025-06-09 15:12         ` Lorenzo Stoakes
2025-06-09  6:10     ` Baolin Wang
2025-06-09 15:17       ` Lorenzo Stoakes
2025-06-11  6:59         ` Baolin Wang
2025-06-08 18:37   ` Nico Pache
2025-06-09  6:36     ` Baolin Wang
2025-06-11 12:34   ` David Hildenbrand
2025-06-12  7:51     ` Baolin Wang
2025-06-12  8:46       ` Dev Jain
2025-06-12  8:52         ` David Hildenbrand
2025-06-12  8:51       ` David Hildenbrand
2025-06-12 12:45         ` Baolin Wang
2025-06-12 13:05           ` David Hildenbrand
2025-06-12 13:25             ` Baolin Wang
2025-06-12 13:40               ` Baolin Wang
2025-06-12 13:27             ` Lorenzo Stoakes
2025-06-12 13:29               ` Lorenzo Stoakes
2025-06-12 14:13                 ` Baolin Wang
2025-06-12 14:16                   ` David Hildenbrand
2025-06-12 14:20                   ` Lorenzo Stoakes
2025-06-12 14:09               ` David Hildenbrand
2025-06-12 14:49                 ` Lorenzo Stoakes
2025-06-13  2:07                   ` Baolin Wang
2025-06-13  5:18                     ` Lorenzo Stoakes
2025-06-12 13:07         ` Lorenzo Stoakes
2025-06-12 13:13           ` David Hildenbrand
2025-06-12 13:31             ` Lorenzo Stoakes
2025-06-05  8:00 ` [PATCH v2 2/2] mm: shmem: disallow hugepages if the system-wide shmem " Baolin Wang
2025-06-07 12:14   ` Lorenzo Stoakes
2025-06-07 12:17     ` Lorenzo Stoakes
2025-06-09  6:34       ` Baolin Wang
2025-06-09 19:30         ` Lorenzo Stoakes
2025-06-09  6:31     ` Baolin Wang
2025-06-09 15:33       ` Lorenzo Stoakes
2025-06-11  7:02         ` Baolin Wang
2025-06-07 12:28 ` [PATCH v2 0/2] fix MADV_COLLAPSE issue if THP " Lorenzo Stoakes
2025-06-11  7:05   ` Baolin Wang
2025-06-13 14:23 ` Usama Arif
2025-06-13 14:29   ` Lorenzo Stoakes
2025-06-13 14:39     ` Usama Arif
2025-06-13 14:42       ` Lorenzo Stoakes

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).