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,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 899F3C433DB for ; Fri, 19 Mar 2021 14:49:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C10B64DC4 for ; Fri, 19 Mar 2021 14:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C10B64DC4 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 AEF806B006E; Fri, 19 Mar 2021 10:49:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC6006B0073; Fri, 19 Mar 2021 10:49:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B46C6B0078; Fri, 19 Mar 2021 10:49:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0126.hostedemail.com [216.40.44.126]) by kanga.kvack.org (Postfix) with ESMTP id 836E86B006E for ; Fri, 19 Mar 2021 10:49:09 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 440E18249980 for ; Fri, 19 Mar 2021 14:49:09 +0000 (UTC) X-FDA: 77936906418.30.789AF8B Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf16.hostedemail.com (Postfix) with ESMTP id 54C1E8019AF8 for ; Fri, 19 Mar 2021 14:49:00 +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 A5A36AC82; Fri, 19 Mar 2021 14:48:54 +0000 (UTC) Subject: Re: [PATCH v3 6/7] mm/mempolicy: Rewrite alloc_pages_vma documentation To: "Matthew Wilcox (Oracle)" , Andrew Morton Cc: linux-mm@kvack.org, Mike Rapoport References: <20210225150642.2582252-1-willy@infradead.org> <20210225150642.2582252-7-willy@infradead.org> From: Vlastimil Babka Message-ID: <44a4b945-89db-d625-794f-8c1f82cf3043@suse.cz> Date: Fri, 19 Mar 2021 15:48:54 +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-7-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Stat-Signature: 5tcjqrqo7ijw3pu31g5u6sjwuj3mn3ar X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 54C1E8019AF8 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf16; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1616165340-948181 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: > The current formatting doesn't quite work with kernel-doc. > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka > --- > mm/mempolicy.c | 34 +++++++++++++--------------------- > 1 file changed, 13 insertions(+), 21 deletions(-) > > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index 24c2100fccba..6d0fe85d4f8d 100644 > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -2153,30 +2153,22 @@ static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, > } > > /** > - * alloc_pages_vma - Allocate a page for a VMA. > - * > - * @gfp: > - * %GFP_USER user allocation. > - * %GFP_KERNEL kernel allocations, > - * %GFP_HIGHMEM highmem/user allocations, > - * %GFP_FS allocation should not call back into a file system. > - * %GFP_ATOMIC don't sleep. > + * alloc_pages_vma - Allocate a page for a VMA. > + * @gfp: GFP flags. > + * @order: Order of the GFP allocation. > + * @vma: Pointer to VMA or NULL if not available. > + * @addr: Virtual address of the allocation. Must be inside @vma. > + * @node: Which node to prefer for allocation (modulo policy). > + * @hugepage: For hugepages try only the preferred node if possible. > * > - * @order:Order of the GFP allocation. > - * @vma: Pointer to VMA or NULL if not available. > - * @addr: Virtual Address of the allocation. Must be inside the VMA. > - * @node: Which node to prefer for allocation (modulo policy). > - * @hugepage: for hugepages try only the preferred node if possible > + * Allocate a page for a specific address in @vma, using the appropriate > + * NUMA policy. When @vma is not NULL the caller must hold the mmap_lock > + * of the mm_struct of the VMA to prevent it from going away. Should be > + * used for all allocations for pages that will be mapped into user space. > * > - * This function allocates a page from the kernel page pool and applies > - * a NUMA policy associated with the VMA or the current process. > - * When VMA is not NULL caller must read-lock the mmap_lock of the > - * mm_struct of the VMA to prevent it from going away. Should be used for > - * all allocations for pages that will be mapped into user space. Returns > - * NULL when no page can be allocated. > + * Return: The page on success or NULL if allocation fails. > */ > -struct page * > -alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma, > +struct page *alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma, > unsigned long addr, int node, bool hugepage) > { > struct mempolicy *pol; >