Re: [Nouveau] [PATCH v3 4/6] mm/thp: add THP allocation helper

2020-11-06 Thread Christoph Hellwig
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +extern struct page *alloc_transhugepage(struct vm_area_struct *vma, > + unsigned long addr); No need for the extern. And also here: do we actually need the stub, or can the caller make sure (using IS_ENABLED and

[Nouveau] [PATCH v3 4/6] mm/thp: add THP allocation helper

2020-11-05 Thread Ralph Campbell
Transparent huge page allocation policy is controlled by several sysfs variables. Rather than expose these to each device driver that needs to allocate THPs, provide a helper function. Signed-off-by: Ralph Campbell --- include/linux/gfp.h | 10 ++ mm/huge_memory.c| 14 ++