Commit eb350739 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Linus Torvalds

mm/mempolicy: rewrite alloc_pages_vma documentation

The current formatting doesn't quite work with kernel-doc.

Link: https://lkml.kernel.org/r/20210225150642.2582252-7-willy@infradead.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6421ec76
...@@ -2154,29 +2154,21 @@ static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, ...@@ -2154,29 +2154,21 @@ static struct page *alloc_page_interleave(gfp_t gfp, unsigned order,
/** /**
* alloc_pages_vma - Allocate a page for a VMA. * alloc_pages_vma - Allocate a page for a VMA.
* * @gfp: GFP flags.
* @gfp: * @order: Order of the GFP allocation.
* %GFP_USER user allocation.
* %GFP_KERNEL kernel allocations,
* %GFP_HIGHMEM highmem/user allocations,
* %GFP_FS allocation should not call back into a file system.
* %GFP_ATOMIC don't sleep.
*
* @order:Order of the GFP allocation.
* @vma: Pointer to VMA or NULL if not available. * @vma: Pointer to VMA or NULL if not available.
* @addr: Virtual Address of the allocation. Must be inside the VMA. * @addr: Virtual address of the allocation. Must be inside @vma.
* @node: Which node to prefer for allocation (modulo policy). * @node: Which node to prefer for allocation (modulo policy).
* @hugepage: for hugepages try only the preferred node if possible * @hugepage: For hugepages try only the preferred node if possible.
* *
* This function allocates a page from the kernel page pool and applies * Allocate a page for a specific address in @vma, using the appropriate
* a NUMA policy associated with the VMA or the current process. * NUMA policy. When @vma is not NULL the caller must hold the mmap_lock
* When VMA is not NULL caller must read-lock the mmap_lock of the * of the mm_struct of the VMA to prevent it from going away. Should be
* mm_struct of the VMA to prevent it from going away. Should be used for * used for all allocations for pages that will be mapped into user space.
* all allocations for pages that will be mapped into user space. Returns *
* NULL when no page can be allocated. * Return: The page on success or NULL if allocation fails.
*/ */
struct page * struct page *alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma,
alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma,
unsigned long addr, int node, bool hugepage) unsigned long addr, int node, bool hugepage)
{ {
struct mempolicy *pol; struct mempolicy *pol;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment