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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 B3F3BC433DB for ; Thu, 25 Feb 2021 15:09:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2F41A64F16 for ; Thu, 25 Feb 2021 15:09:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F41A64F16 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7CD9E6B0074; Thu, 25 Feb 2021 10:09:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 72D478D0005; Thu, 25 Feb 2021 10:09:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5CFAF8D0003; Thu, 25 Feb 2021 10:09:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id 494AC6B0074 for ; Thu, 25 Feb 2021 10:09:30 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F2BE6824C451 for ; Thu, 25 Feb 2021 15:09:29 +0000 (UTC) X-FDA: 77857124058.30.9048C63 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP id EEB28E00011B for ; Thu, 25 Feb 2021 15:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=3GTphpT2/2Bt5bhrNuv4BgDMBupcZbVdgM+49SuSIYM=; b=aWCrcb/QFg1DdnnrjSco8YWAfJ d5hZyUOngi1N+K+yp9b0DS3vad1KrCm51VX84DhU+c5GhsmrwFa4PlJuOqhvPyK5594LuIc6mb1If cN4N5yGZQKxuCeTgJ59dIODoLASMpovFlb+Zbz6fEQ0B1UXphd/7rbpdnXsK9KNcKXD2V7b3YWpI1 5o+6SZw9wNymdcyZwUPrZ14RuY988Dqr1q0r50dy4Gf9/1DokXcb8Kp0HqJwhkDhg4I6zAwBP9q2M CWbRqfRhLlfqsLdXyuSxu8PXCgdKRwSSJZ8bNpTwEP3sPf/4oSODLxDadlYn82SOkk8Mf4K3rUuE9 Jk2XYdqA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lFIFw-00Aprn-39; Thu, 25 Feb 2021 15:08:50 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Mike Rapoport , Michal Hocko Subject: [PATCH v3 5/7] mm/mempolicy: Rewrite alloc_pages documentation Date: Thu, 25 Feb 2021 15:06:40 +0000 Message-Id: <20210225150642.2582252-6-willy@infradead.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210225150642.2582252-1-willy@infradead.org> References: <20210225150642.2582252-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EEB28E00011B X-Stat-Signature: epwx9xxx48fj66zagb8au5sqgox9d6oc Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf21; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614265763-827003 Content-Transfer-Encoding: quoted-printable 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: 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 --- 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_a= rea_struct *vma, EXPORT_SYMBOL(alloc_pages_vma); =20 /** - * 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 ali= gned + * to a multiple of 8 * PAGE_SIZE bytes). The NUMA policy of the curren= t + * 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 GF= P + * flags are used. + * Return: The page on success or NULL if allocation fails. */ struct page *alloc_pages(gfp_t gfp, unsigned order) { --=20 2.29.2