From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04C8FC433DB for ; Tue, 16 Feb 2021 08:22:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8A5F164E00 for ; Tue, 16 Feb 2021 08:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A5F164E00 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D53C48D015A; Tue, 16 Feb 2021 03:22:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D02948D0140; Tue, 16 Feb 2021 03:22:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C18A58D015A; Tue, 16 Feb 2021 03:22:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id A86B38D0140 for ; Tue, 16 Feb 2021 03:22:52 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7B5C58248047 for ; Tue, 16 Feb 2021 08:22:52 +0000 (UTC) X-FDA: 77823440184.14.man92_1f0ce2c27642 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 5EBA518229996 for ; Tue, 16 Feb 2021 08:22:52 +0000 (UTC) X-HE-Tag: man92_1f0ce2c27642 X-Filterd-Recvd-Size: 3375 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Tue, 16 Feb 2021 08:22:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613463770; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JXb06BF03PHgEwOETjr7Z7I7LGpcBiN3+It/Zmm2X8E=; b=PtY+WX5jjcqADAfr9joDGoTrBk6NB84gftDknO6keOLxb5TmauYaZXtfInA977EQGvkaad KcbM7/7GfhwArg3kgKtDuuZdl13NAycnN5rU6s9m/D6688P1uCYPttzLdQnUMiY04t6w3I qybhbC2q2fQzWp9LdRiuV8eTF1sU4h8= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D5843AD29; Tue, 16 Feb 2021 08:22:50 +0000 (UTC) Date: Tue, 16 Feb 2021 09:22:50 +0100 From: Michal Hocko To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , linux-mm@kvack.org, Mike Rapoport Subject: Re: [PATCH v2 5/6] mm/mempolicy: Rewrite alloc_pages documentation Message-ID: References: <20210215210203.3827513-1-willy@infradead.org> <20210215210203.3827513-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210215210203.3827513-6-willy@infradead.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon 15-02-21 21:02:02, Matthew Wilcox wrote: > Document alloc_pages() for both NUMA and non-NUMA cases as kernel-doc > doesn't care. > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Michal Hocko > --- > 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. > */ > struct page *alloc_pages(gfp_t gfp, unsigned order) > { > -- > 2.29.2 > -- Michal Hocko SUSE Labs