Re: [PATCH v10 19/21] mm: Add vmalloc_huge_node()
From: Sebastian Andrzej Siewior
Date: Thu Mar 13 2025 - 03:59:36 EST
On 2025-03-12 15:02:06 [-0700], Andrew Morton wrote:
> On Wed, 12 Mar 2025 16:16:32 +0100 Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
>
> > From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> >
> > To enable node specific hash-tables.
>
> "... using huge pages if possible"?
>
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -3966,6 +3966,13 @@ void *vmalloc_huge_noprof(unsigned long size, gfp_t gfp_mask)
> > }
> > EXPORT_SYMBOL_GPL(vmalloc_huge_noprof);
> >
> > +void *vmalloc_huge_node_noprof(unsigned long size, gfp_t gfp_mask, int node)
> > +{
> > + return __vmalloc_node_range_noprof(size, 1, VMALLOC_START, VMALLOC_END,
> > + gfp_mask, PAGE_KERNEL, VM_ALLOW_HUGE_VMAP,
> > + node, __builtin_return_address(0));
> > +}
> > +
>
> kerneldoc please?
Okay.
>
> I suppose we can now simplify vmalloc_huge_noprof() to use this:
>
> static inline void *vmalloc_huge_noprof(unsigned long size, gfp_t gfp_mask)
> {
> return vmalloc_huge_node_noprof(size, gfp_mask, NUMA_NO_NODE);
> }
Do you want me to stash this into this one or as a follow up?
Sebastian