aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Popple <[email protected]>2025-06-19 08:58:00 +0000
committerAndrew Morton <[email protected]>2025-07-10 05:42:17 +0000
commit2f4e882d955b19ff7b216d6a29a77fcba045b7cc (patch)
tree42f844798864d8e0327df00c4cf548b8cdab8b7e
parentmm: remove redundant pXd_devmap calls (diff)
downloadkernel-2f4e882d955b19ff7b216d6a29a77fcba045b7cc.tar.gz
kernel-2f4e882d955b19ff7b216d6a29a77fcba045b7cc.zip
mm/khugepaged: remove redundant pmd_devmap() check
The pmd_devmap() check in check_pmd_state() is redundant because the only user of pmd_devmap were device dax and fs dax. However all callers of check_pmd_state() first call thp_vma_allowable_order() to check if the vma should be scanned. Except when called from a page fault this always returns 0 for dax vma's, hence we would never expect to see a pmd_devmap entry. Link: https://lkml.kernel.org/r/a68175fd3a37e9b72cc82c1d63fd8b69691a85b5.1750323463.git-series.apopple@nvidia.com Signed-off-by: Alistair Popple <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Björn Töpel <[email protected]> Cc: Björn Töpel <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Chunyan Zhang <[email protected]> Cc: Dan Williams <[email protected]> Cc: Deepak Gupta <[email protected]> Cc: Gerald Schaefer <[email protected]> Cc: Inki Dae <[email protected]> Cc: John Groves <[email protected]> Cc: John Hubbard <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/khugepaged.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 6b09b09c8f82..3495a20cef5e 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -945,8 +945,6 @@ static inline int check_pmd_state(pmd_t *pmd)
return SCAN_PMD_NULL;
if (pmd_trans_huge(pmde))
return SCAN_PMD_MAPPED;
- if (pmd_devmap(pmde))
- return SCAN_PMD_NULL;
if (pmd_bad(pmde))
return SCAN_PMD_NULL;
return SCAN_SUCCEED;