[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aExzn1CFGpA9szrq@x1.local>
Date: Fri, 13 Jun 2025 14:53:19 -0400
From: Peter Xu <peterx@...hat.com>
To: Alex Mastro <amastro@...com>
Cc: akpm@...ux-foundation.org, alex.williamson@...hat.com, david@...hat.com,
jgg@...dia.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, npache@...hat.com, ziy@...dia.com
Subject: Re: [PATCH 5/5] vfio-pci: Best-effort huge pfnmaps with !MAP_FIXED
mappings
On Fri, Jun 13, 2025 at 10:44:42AM -0700, Alex Mastro wrote:
> Thank you Peter!
>
> I packported this series to our 6.13.2 tree and validated that it does indeed
> provide equivalent, optimal faulting to our manual alignment approach when we
> mmap with !MAP_FIXED. This addresses the issue we discovered in [1].
>
> The test case is performing mmap with offset=0x40006000000, size=0xdf9e00000,
> and we see that the head and tail (975) are faulted at 2M, and middle (54) at
> 1G. The vma returned by mmap looks nice: 0x7f8646000000.
>
> $ sudo bpftrace -q -e 'fexit:vfio_pci_mmap_huge_fault { printf("order=%d, ret=0x%x\n", args.order, retval); }' 2>&1 > ~/dump
> $ cat ~/dump | sort | uniq -c | sort -nr
> 975 order=9, ret=0x100
> 54 order=18, ret=0x100
> 2 order=18, ret=0x800
>
> [1] https://lore.kernel.org/linux-pci/20250529214414.1508155-1-amastro@fb.com/
>
> Tested-by: Alex Mastro <amastro@...com>
Great to know it works as expected, thanks for the quick feedback!
--
Peter Xu
Powered by blists - more mailing lists