Skip to content

Commit 8cfd014

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
hugetlb: add documentation for vma_kernel_pagesize()
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. Link: https://lkml.kernel.org/r/20230822172459.4190699-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 61ff748 commit 8cfd014

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

mm/hugetlb.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,14 @@ pgoff_t linear_hugepage_index(struct vm_area_struct *vma,
968968
}
969969
EXPORT_SYMBOL_GPL(linear_hugepage_index);
970970

971-
/*
972-
* Return the size of the pages allocated when backing a VMA. In the majority
973-
* cases this will be same size as used by the page table entries.
971+
/**
972+
* vma_kernel_pagesize - Page size granularity for this VMA.
973+
* @vma: The user mapping.
974+
*
975+
* Folios in this VMA will be aligned to, and at least the size of the
976+
* number of bytes returned by this function.
977+
*
978+
* Return: The default size of the folios allocated when backing a VMA.
974979
*/
975980
unsigned long vma_kernel_pagesize(struct vm_area_struct *vma)
976981
{

0 commit comments

Comments
 (0)