Re: [PATCH RFC 01/13] mm/hmm: Process pud swap entry without pud_huge()

2024-03-07 Thread Peter Xu
On Thu, Mar 07, 2024 at 02:12:33PM -0400, Jason Gunthorpe wrote: > On Wed, Mar 06, 2024 at 06:41:35PM +0800, pet...@redhat.com wrote: > > From: Peter Xu > > > > Swap pud entries do not always return true for pud_huge() for all archs. > > x86 and sparc (so far) allow it, but all the rest do not

Re: [PATCH RFC 01/13] mm/hmm: Process pud swap entry without pud_huge()

2024-03-07 Thread Jason Gunthorpe
On Wed, Mar 06, 2024 at 06:41:35PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Swap pud entries do not always return true for pud_huge() for all archs. > x86 and sparc (so far) allow it, but all the rest do not accept a swap > entry to be reported as pud_huge(). So it's not safe to

[PATCH RFC 01/13] mm/hmm: Process pud swap entry without pud_huge()

2024-03-06 Thread peterx
From: Peter Xu Swap pud entries do not always return true for pud_huge() for all archs. x86 and sparc (so far) allow it, but all the rest do not accept a swap entry to be reported as pud_huge(). So it's not safe to check swap entries within pud_huge(). Check swap entries before pud_huge(), so