[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a68175fd3a37e9b72cc82c1d63fd8b69691a85b5.1750323463.git-series.apopple@nvidia.com>
Date: Thu, 19 Jun 2025 18:58:00 +1000
From: Alistair Popple <apopple@...dia.com>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org,
Alistair Popple <apopple@...dia.com>,
gerald.schaefer@...ux.ibm.com,
dan.j.williams@...el.com,
jgg@...pe.ca,
willy@...radead.org,
david@...hat.com,
linux-kernel@...r.kernel.org,
nvdimm@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org,
jhubbard@...dia.com,
hch@....de,
zhang.lyra@...il.com,
debug@...osinc.com,
bjorn@...nel.org,
balbirs@...dia.com,
lorenzo.stoakes@...cle.com,
linux-arm-kernel@...ts.infradead.org,
loongarch@...ts.linux.dev,
linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org,
linux-cxl@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
John@...ves.net,
m.szyprowski@...sung.com,
Jason Gunthorpe <jgg@...dia.com>
Subject: [PATCH v3 08/14] 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.
Signed-off-by: Alistair Popple <apopple@...dia.com>
Acked-by: David Hildenbrand <david@...hat.com>
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
---
Changes from v2:
- Update commit message to better reflect why the check was redundant
---
mm/khugepaged.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 15203ea..d45d08b 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;
--
git-series 0.9.1
Powered by blists - more mailing lists