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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 19062C433DB for ; Fri, 19 Mar 2021 14:47:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8557F64F18 for ; Fri, 19 Mar 2021 14:47:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8557F64F18 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 216C16B006E; Fri, 19 Mar 2021 10:47:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C71B6B0073; Fri, 19 Mar 2021 10:47:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08F616B0078; Fri, 19 Mar 2021 10:47:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id E4F0F6B006E for ; Fri, 19 Mar 2021 10:47:45 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A1D5C8249980 for ; Fri, 19 Mar 2021 14:47:45 +0000 (UTC) X-FDA: 77936902890.07.0C17988 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf24.hostedemail.com (Postfix) with ESMTP id A6C38A0009E2 for ; Fri, 19 Mar 2021 14:47:39 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7698FAC17; Fri, 19 Mar 2021 14:47:38 +0000 (UTC) Subject: Re: [PATCH v3 5/7] mm/mempolicy: Rewrite alloc_pages documentation To: "Matthew Wilcox (Oracle)" , Andrew Morton Cc: linux-mm@kvack.org, Mike Rapoport , Michal Hocko References: <20210225150642.2582252-1-willy@infradead.org> <20210225150642.2582252-6-willy@infradead.org> From: Vlastimil Babka Message-ID: <4e8bafc9-20b9-004e-a911-38a6d994bf3e@suse.cz> Date: Fri, 19 Mar 2021 15:47:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210225150642.2582252-6-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A6C38A0009E2 X-Stat-Signature: 4h5ds8oixpbakxpqmhscdt75em84yxn4 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1616165259-353776 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 2/25/21 4:06 PM, 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) > Acked-by: Mike Rapoport > Acked-by: Michal Hocko Acked-by: Vlastimil Babka > --- > mm/mempolicy.c | 21 ++++++++++----------- > 1 file changed, 10 insertions(+), 11 deletions(-) > > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index c71532b7e3f8..24c2100fccba 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: The page on success or NULL if allocation fails. > */ > struct page *alloc_pages(gfp_t gfp, unsigned order) > { >