From patchwork Tue Aug 22 17:24:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13361229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E96EE49A3 for ; Tue, 22 Aug 2023 17:25:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B9EDE280046; Tue, 22 Aug 2023 13:25:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B4F00280042; Tue, 22 Aug 2023 13:25:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3EC5280046; Tue, 22 Aug 2023 13:25:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 95A88280042 for ; Tue, 22 Aug 2023 13:25:06 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6641DC032B for ; Tue, 22 Aug 2023 17:25:06 +0000 (UTC) X-FDA: 81152416212.27.21BD31B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP id BB9431C0008 for ; Tue, 22 Aug 2023 17:25:04 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oCJhxzOn; dmarc=none; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692725104; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=BDD+kkbpSwoHvHwoL9O14mlEsgVZ2Onhd6Y6JAuPSwI=; b=H1NhKBiSbht4dBtwbEeKKaN8W2puArIRYn052vB5/DhC/+7JXr9W8Lft4Ta8j/NoCmM/zK ne0PCyESYjAXPVq63HgINz/+SqEuezeCKU9rXNlN1lhIjtTKAfB/Tzph01tNI74U8jVWBd fcaWQ/wJ4//3cjtNjdb+yJPktrpB4sU= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oCJhxzOn; dmarc=none; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692725104; a=rsa-sha256; cv=none; b=DH8lxjlC7xuw7hyNVUVg0SvS5hw3XTkDflNi/UpvRHA1l6Ha5hNN5hHyxziU1p1juIgDZk Nagkhr6MxR4nCJ4snZQaS0KW7knU9zSz2VOyT5sYV8zuq0/B00co2/g75+KPr6XjYk5LaA M5WxbymoWj8ngjOFrR6JAhVAIpuaWtc= 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: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=BDD+kkbpSwoHvHwoL9O14mlEsgVZ2Onhd6Y6JAuPSwI=; b=oCJhxzOnEHSHaE2ZDIB4Dey0xw dSinz5YD5IKxDmk5UyWUTgx3o+bXNYkU8DRLGGNYayj0xtZWfKp69yVutXgWn/Zs4TPLX1HynR5+u 7a8B1ScVmB02afb+e1nPrf2jh2Y4hE8JA628yib35UJyblHdGzYR0k/jk0Ja11RZY+4g0q3SRq5tp 4rehi22piSUrGdkaPYe7rKbnkq6WNHIfPgmXMrrEvXKzGtQKuP2MjBseNcg3n58EZDNrmqzIIhbF9 wWbgK2bwr5GPXUz1PoueHkmNmuDyRsIM1IM4oORDmazbNr+7PsrcqiCWmGIVUtPEcfuJ7lpXFdxb/ IXvQiaAw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qYV7l-00HaCx-NY; Tue, 22 Aug 2023 17:25:01 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton , linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH] hugetlb: Add documentation for vma_kernel_pagesize() Date: Tue, 22 Aug 2023 18:24:59 +0100 Message-Id: <20230822172459.4190699-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: BB9431C0008 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ucakomshwnhqozhbq7ggcr6a9mt5e75f X-HE-Tag: 1692725104-733947 X-HE-Meta: U2FsdGVkX18uGPeGC7a7LE8e8+k6joPhNAVjNnlskXDv+ukAh13lzbC2qwln9WfdpqhVax86z+Bd5oA8ze7gW6Q+yWjkGesR5mDKZVlmKSP22CoV+F5AgJxNaNg7n8RqoBJfU5eIK0UrqqHIAokvhEOFq1fM+2ZvcrcRzsaoA+RQarp2oiQ+UyFdAqiqrQXu/OfvZHn1KDqFQ5gwj+0H+enYjGvp6vf42kjsfQaXtQoMl6ZWtFku5ySy3+rgqE5LBUYF1UIvERdGXfktVuywFcqlp7ZBH+/hV7Qpnd9i4aP7oNFKuXMo1wBYa5hB2iB9isf193uO3UhZbjC+VfzhdsMjUxrAWNpT2tLxsryk2N3twRRRwRfca8GZglQvItk4jM3JmbiPab4Itd+ltCSQ/hcHMy2boheBq7Pqv/u09476WL5oEQF8xKQ334nD7Y/I3PBoRuL7JRVnLjpPraJBdY5gzl++/SSg/kR/E/EglU/ZnSE0/cizDH7iu9X1rqlbPjJzKgzfIgHFQEnAx4X+Jtxqwd8N43rQ1xrRR0C1uc+J6jqiAupIjDNjjy80mcBBpbVGU6LZkUMzVq6SlGrMWlY58ZnJZ+zI/z5TZdgASKfHyT+jT+YKP3VCFYwcQEtXzdgCcs0Iq0lk3UZ34z91tLO/oPdHKHmg0ux8O9P3YWPGclBrXHaYRcncgEgDd7ORUtwJ/nng7jquTOFQQko2vo370dkw5K1kGBkWXfLhFBoaAoUnnYUih19hYgBprBefBPvx1DVRPx6tivRAMz7UOv2FZ96vy6XJ+sJiPcTmU9QntPXXsEP29+6HKs0WycCtykPcuS8EuW74c83bcqqOXki8UCCkbIs6kWT/BqY8seCy4hqJzx5YBpbRa6KlOJhnRMUQwRz7O8x6JUAjLCC5uQ3soQe5Ocl/9SVZwRdDxMXZva3a6OG+tJUNLldDvDHKO/hkSKe8ubt5YEOStrM v7NzeP6J rqDaCRrP95GPtU3WwxCfMHQ5RovmtUFnRjEsjwuwNQipXiMZsRU+TrfbSjA/wk25I8f65I8FGK+qWD22YwiZSiskGW0clv3N/gQMYCvxWPaJpIMX/wV4qVj99cUbJz/GeAbtr34Cm/tu1XD51fIm39+TBLB6W++YyfS/D1Nh9XynPOCKUQc6b450lbcb4zVY8+QpLaDF0PH6h6fr7abRjwbAqRlpFuq+gDhwx 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: This is an exported symbol, so it should have kernel-doc. Update it to mention folios, and point out that they might be larger than the supported page size for this VMA. Signed-off-by: Matthew Wilcox (Oracle) --- mm/hugetlb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 283cd5290515..dfadb3bfd284 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -968,9 +968,14 @@ pgoff_t linear_hugepage_index(struct vm_area_struct *vma, } EXPORT_SYMBOL_GPL(linear_hugepage_index); -/* - * Return the size of the pages allocated when backing a VMA. In the majority - * cases this will be same size as used by the page table entries. +/** + * vma_kernel_pagesize - Page size granularity for this VMA. + * @vma: The user mapping. + * + * Folios in this VMA will be aligned to, and at least the size of the + * number of bytes returned by this function. + * + * Return: The default size of the folios allocated when backing a VMA. */ unsigned long vma_kernel_pagesize(struct vm_area_struct *vma) {