* [PATCH] hugetlb: Add documentation for vma_kernel_pagesize()
@ 2023-08-22 17:24 Matthew Wilcox (Oracle)
0 siblings, 0 replies; only message in thread
From: Matthew Wilcox (Oracle) @ 2023-08-22 17:24 UTC (permalink / raw)
To: Andrew Morton, linux-mm; +Cc: Matthew Wilcox (Oracle)
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) <willy@infradead.org>
---
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)
{
--
2.40.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-22 17:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 17:24 [PATCH] hugetlb: Add documentation for vma_kernel_pagesize() Matthew Wilcox (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox