[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YlkRS36hKDkPtbBN@infradead.org>
Date: Thu, 14 Apr 2022 23:31:39 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Song Liu <song@...nel.org>
Cc: bpf@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
kernel-team@...com, akpm@...ux-foundation.org,
rick.p.edgecombe@...el.com, hch@...radead.org,
imbrenda@...ux.ibm.com, mcgrof@...nel.org
Subject: Re: [PATCH v3 bpf RESEND 1/4] vmalloc: replace VM_NO_HUGE_VMAP with
VM_ALLOW_HUGE_VMAP
On Thu, Apr 14, 2022 at 12:59:11PM -0700, Song Liu wrote:
> +void *vmalloc_huge(unsigned long size)
> +{
> + return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
> + GFP_KERNEL, PAGE_KERNEL, VM_ALLOW_HUGE_VMAP,
> + NUMA_NO_NODE, __builtin_return_address(0));
> +}
> +EXPORT_SYMBOL_GPL(vmalloc_huge);
It seems like this one isn't actually used in this series, so I'd
suggest to drop it.
> +
> +/**
> + * __vmalloc_huge - allocate virtually contiguous memory, allow huge pages
> + * @size: allocation size
> + * @gfp_mask: flags for the page level allocator
> + *
> + * Allocate enough pages to cover @size from the page level
> * allocator and map them into contiguous kernel virtual space.
> + * If @size is greater than or equal to PMD_SIZE, allow using
> + * huge pages for the memory
> *
> * Return: pointer to the allocated memory or %NULL on error
> */
> -void *vmalloc_no_huge(unsigned long size)
> +void *__vmalloc_huge(unsigned long size, gfp_t gfp_mask)
And I'd just rename this vmalloc_huge.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists