On Thu, Jun 11, 2026 at 09:11:01AM +0530, Aboorva Devarajan wrote:
> From: Sayali Patil <[email protected]>
> 
> migrate_partial_unmap_fault() and migrate_remap_fault() use
> hardcoded offsets based on a 2MB PMD size. Similarly,
> benchmark_thp_migration() assumes a fixed 2MB THP size when generating
> test buffer sizes.
> 
> Derive offsets and test sizes from the runtime PMD page size returned
> by read_pmd_pagesize(). If unavailable, fall back to TWOMEG.
> This allows the tests to adapt correctly on systems where
> PMD-sized THP differs from 2MB. Also replace the fixed 1MB unmap
> size with a PMD-relative value derived from the runtime PMD size.
> 
> On systems with larger PMD sizes, computed test buffer sizes can exceed
> INT_MAX. Skip such test cases to avoid overflow.
> 
> Fixes: 24c2c5b8ffbd ("selftests/mm/hmm-tests: partial unmap, mremap and 
> anon_write tests")
> Fixes: 271a7b2e3c13 ("selftests/mm/hmm-tests: new throughput tests including 
> THP")
> Signed-off-by: Sayali Patil <[email protected]>
> Signed-off-by: Aboorva Devarajan <[email protected]>
> ---

Thanks,

Acked-by: Balbir Singh <[email protected]>

Reply via email to