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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 50FABC433DB for ; Thu, 25 Feb 2021 18:42:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D7DB864DD3 for ; Thu, 25 Feb 2021 18:42:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7DB864DD3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 548896B0005; Thu, 25 Feb 2021 13:42:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FBAA6B0006; Thu, 25 Feb 2021 13:42:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39A626B006C; Thu, 25 Feb 2021 13:42:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 23AC16B0005 for ; Thu, 25 Feb 2021 13:42:54 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CBFB6824C42B for ; Thu, 25 Feb 2021 18:42:53 +0000 (UTC) X-FDA: 77857661826.26.863369C Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf19.hostedemail.com (Postfix) with ESMTP id 120D190009E9 for ; Thu, 25 Feb 2021 18:42:47 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PIYdrE058249; Thu, 25 Feb 2021 13:42:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=WTbpTCcIAIV34xDYc27FLitrUaz44V/Cc/F4Z2KxcT8=; b=kJjWkov2ziQasQ8nNagk381yE1Z6dOMKZyQDoYY4Vf2ScxcDOCBTRmp8efkU+d02JHXN y7GWpj5SfuBI1mQ0IsuRm+4bKhKCR1iileSpgnCCeT+VekKSfJJARAic9OyZKdDM9vri R2wT6KN6QjMhBlJ1Pv2z3bpV7b5cmo8ye5So7XJRis3YfrVUtRpSA17iRWx0EgPBHGoi roA+jPZI7HFro70uPeL9RpzyPB8NB0CmyeHUQEMbnS3oOJKVamnM8fI6mnKOv4+0Ghfu YDx1iRiNf4GYEeRNY9w3NbDonNEYXM3QAV43NszPrZETCtVFwYE0rDIa/8x3ln4j16ay tw== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 36xh8t081g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 13:42:48 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PIdWdC010360; Thu, 25 Feb 2021 18:42:46 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 36tt28af1h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 18:42:46 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PIgiFK24904106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 18:42:44 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 68BDEA404D; Thu, 25 Feb 2021 18:42:44 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBDE8A4040; Thu, 25 Feb 2021 18:42:43 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.51.238]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 25 Feb 2021 18:42:43 +0000 (GMT) Date: Thu, 25 Feb 2021 20:42:41 +0200 From: Mike Rapoport To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH v3 6/7] mm/mempolicy: Rewrite alloc_pages_vma documentation Message-ID: <20210225184241.GJ1854360@linux.ibm.com> References: <20210225150642.2582252-1-willy@infradead.org> <20210225150642.2582252-7-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225150642.2582252-7-willy@infradead.org> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_10:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250140 X-Stat-Signature: 14qbc8g1xehdwsq5thadyi9f5jicuk9o X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 120D190009E9 Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf19; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.158.5 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614278567-746789 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 Thu, Feb 25, 2021 at 03:06:41PM +0000, Matthew Wilcox (Oracle) wrote: > The current formatting doesn't quite work with kernel-doc. > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport > --- > 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; > -- > 2.29.2 > -- Sincerely yours, Mike.