summaryrefslogtreecommitdiff
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:02:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:02:50 +0100
commit37022410f4a3cc11614626a58cd08bcf8ea529e9 (patch)
tree60e0a996385b1d5865dc5264ff130cf9e852abb4 /mm/huge_memory.c
parentaad1577ab950d1ad46e0dd0915bfbaf9fa9160e4 (diff)
parentdcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa (diff)
Merge 6.18-rc3 into driver-core-next
We need the driver core fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1b81680b4225..1d1b74950332 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -4109,6 +4109,9 @@ static bool thp_underused(struct folio *folio)
if (khugepaged_max_ptes_none == HPAGE_PMD_NR - 1)
return false;
+ if (folio_contain_hwpoisoned_page(folio))
+ return false;
+
for (i = 0; i < folio_nr_pages(folio); i++) {
if (pages_identical(folio_page(folio, i), ZERO_PAGE(0))) {
if (++num_zero_pages > khugepaged_max_ptes_none)