Re: [PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-02-22 Thread Peter Xu
On Wed, Feb 21, 2024 at 08:57:53AM -0400, Jason Gunthorpe wrote: > On Wed, Feb 21, 2024 at 05:37:37PM +0800, Peter Xu wrote: > > On Mon, Jan 15, 2024 at 01:55:51PM -0400, Jason Gunthorpe wrote: > > > On Wed, Jan 03, 2024 at 05:14:13PM +0800, pet...@redhat.com wrote: > > > > From: Peter Xu > > > >

Re: [PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-02-21 Thread Jason Gunthorpe
On Wed, Feb 21, 2024 at 05:37:37PM +0800, Peter Xu wrote: > On Mon, Jan 15, 2024 at 01:55:51PM -0400, Jason Gunthorpe wrote: > > On Wed, Jan 03, 2024 at 05:14:13PM +0800, pet...@redhat.com wrote: > > > From: Peter Xu > > > > > > ARM defines pmd_thp_or_huge(), detecting either a THP or a huge PMD.

Re: [PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-02-21 Thread Peter Xu
On Mon, Jan 15, 2024 at 01:55:51PM -0400, Jason Gunthorpe wrote: > On Wed, Jan 03, 2024 at 05:14:13PM +0800, pet...@redhat.com wrote: > > From: Peter Xu > > > > ARM defines pmd_thp_or_huge(), detecting either a THP or a huge PMD. It > > can be a helpful helper if we want to merge more THP and hu

Re: [PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:13PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > ARM defines pmd_thp_or_huge(), detecting either a THP or a huge PMD. It > can be a helpful helper if we want to merge more THP and hugetlb code > paths. Make it a generic default implementation, only exist w

[PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-01-03 Thread peterx
From: Peter Xu ARM defines pmd_thp_or_huge(), detecting either a THP or a huge PMD. It can be a helpful helper if we want to merge more THP and hugetlb code paths. Make it a generic default implementation, only exist when CONFIG_MMU. Arch can overwrite it by defining its own version. For exam