lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@lst.de>

\
 
 \ /
  Last update: 2022-04-15 08:32    [W:0.031 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site