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

mm/mempolicy: rewrite alloc_pages documentation

Document alloc_pages() for both NUMA and non-NUMA cases as kernel-doc
doesn't care.

Link: https://lkml.kernel.org/r/20210225150642.2582252-6-willy@infradead.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d7f946d0
...@@ -2246,18 +2246,17 @@ EXPORT_SYMBOL(alloc_pages_vma); ...@@ -2246,18 +2246,17 @@ EXPORT_SYMBOL(alloc_pages_vma);
/** /**
* alloc_pages - Allocate pages. * alloc_pages - Allocate pages.
* @gfp: GFP flags.
* @order: Power of two of number of pages to allocate.
* *
* @gfp: * Allocate 1 << @order contiguous pages. The physical address of the
* %GFP_USER user allocation, * first page is naturally aligned (eg an order-3 allocation will be aligned
* %GFP_KERNEL kernel allocation, * to a multiple of 8 * PAGE_SIZE bytes). The NUMA policy of the current
* %GFP_HIGHMEM highmem allocation, * process is honoured when in process context.
* %GFP_FS don't call back into a file system.
* %GFP_ATOMIC don't sleep.
* @order: Power of two of allocation size in pages. 0 is a single page.
* *
* Allocate a page from the kernel page pool. When not in * Context: Can be called from any context, providing the appropriate GFP
* interrupt context and apply the current process NUMA policy. * flags are used.
* Returns NULL when no page can be allocated. * Return: The page on success or NULL if allocation fails.
*/ */
struct page *alloc_pages(gfp_t gfp, unsigned order) struct page *alloc_pages(gfp_t gfp, unsigned order)
{ {
......
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