All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH v2 5/6] mm/mempolicy: Rewrite alloc_pages documentation
Date: Mon, 15 Feb 2021 23:47:40 +0200	[thread overview]
Message-ID: <20210215214740.GU299309@linux.ibm.com> (raw)
In-Reply-To: <20210215210203.3827513-6-willy@infradead.org>

On Mon, Feb 15, 2021 at 09:02:02PM +0000, Matthew Wilcox (Oracle) wrote:
> Document alloc_pages() for both NUMA and non-NUMA cases as kernel-doc
> doesn't care.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

One nit below, otherwise

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  mm/mempolicy.c | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index c71532b7e3f8..96c98ce16727 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -2245,19 +2245,18 @@ alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma,
>  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:
> - *		%GFP_USER   user allocation,
> - *      	%GFP_KERNEL kernel allocation,
> - *      	%GFP_HIGHMEM highmem allocation,
> - *      	%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 1 << @order contiguous pages.  The physical address of the
> + * first page is naturally aligned (eg an order-3 allocation will be aligned
> + * to a multiple of 8 * PAGE_SIZE bytes).  The NUMA policy of the current
> + * process is honoured when in process context.
>   *
> - *	Allocate a page from the kernel page pool.  When not in
> - *	interrupt context and apply the current process NUMA policy.
> - *	Returns NULL when no page can be allocated.
> + * Context: Can be called from any context, providing the appropriate GFP
> + * flags are used.
> + * Return: NULL when no page can be allocated.

Don't you want to mention the return value on success? It is quite obvious,
but still.

>   */
>  struct page *alloc_pages(gfp_t gfp, unsigned order)
>  {
> -- 
> 2.29.2
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2021-02-15 21:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 21:01 [PATCH v2 0/6] Rationalise __alloc_pages wrappers Matthew Wilcox (Oracle)
2021-02-15 21:01 ` [PATCH v2 1/6] mm/page_alloc: Rename alloc_mask to alloc_gfp Matthew Wilcox (Oracle)
2021-02-15 21:01 ` [PATCH v2 2/6] mm/page_alloc: Rename gfp_mask to gfp Matthew Wilcox (Oracle)
2021-02-15 21:02 ` [PATCH v2 3/6] mm/page_alloc: Combine __alloc_pages and __alloc_pages_nodemask Matthew Wilcox (Oracle)
2021-02-15 21:02 ` [PATCH v2 4/6] mm/mempolicy: Rename alloc_pages_current to alloc_pages Matthew Wilcox (Oracle)
2021-02-15 21:02 ` [PATCH v2 5/6] mm/mempolicy: Rewrite alloc_pages documentation Matthew Wilcox (Oracle)
2021-02-15 21:47   ` Mike Rapoport [this message]
2021-02-15 22:32     ` Matthew Wilcox
2021-02-16  5:37       ` Mike Rapoport
2021-02-16  8:22   ` Michal Hocko
2021-02-15 21:02 ` [PATCH v2 6/6] mm/mempolicy: Fix mpol_misplaced kernel-doc Matthew Wilcox (Oracle)
2021-02-15 21:51   ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215214740.GU299309@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.