[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aM-rwfvR32xmbCXj@kernel.org>
Date: Sun, 21 Sep 2025 10:39:45 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Remove PMD alignment constraint in execmem_vmalloc()
Hi Ryan,
On Thu, Sep 18, 2025 at 02:06:25PM +0100, Ryan Roberts wrote:
> On 18/09/2025 11:33, Mike Rapoport wrote:
> > On Thu, Sep 18, 2025 at 03:04:53PM +0530, Dev Jain wrote:
> >> When using vmalloc with VM_ALLOW_HUGE_VMAP flag, it will set the alignment
> >> to PMD_SIZE internally, if it deems huge mappings to be eligible.
> >> Therefore, setting the alignment in execmem_vmalloc is redundant. Apart
> >> from this, it also reduces the probability of allocation in case vmalloc
> >> fails to allocate hugepages - in the fallback case, vmalloc tries to use
> >> the original alignment and allocate basepages, which unfortunately will
> >> again be PMD_SIZE passed over from execmem_vmalloc, thus constraining
> >> the search for a free space in vmalloc region.
> >>
> >> Therefore, remove this constraint.
> >>
> >> Signed-off-by: Dev Jain <dev.jain@....com>
> >
> > Reviewed-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
>
> Hijacking this thread to ask Mike a related question, which I noticed during
> code review...
Replied on the related thread :)
https://lore.kernel.org/all/aM-rDD-TRqmtr6Nb@kernel.org/
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists