aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <[email protected]>2025-03-03 16:29:55 +0000
committerAndrew Morton <[email protected]>2025-03-18 05:06:43 +0000
commit1ea5212aed0682ae1249cba9df7ad7ef539d0a7d (patch)
treea03d4d45f0a439d2dd99b45131ea70bee78f7f17 /mm/page_alloc.c
parentmm: factor out large folio handling from folio_order() into folio_large_order() (diff)
downloadkernel-1ea5212aed0682ae1249cba9df7ad7ef539d0a7d.tar.gz
kernel-1ea5212aed0682ae1249cba9df7ad7ef539d0a7d.zip
mm: factor out large folio handling from folio_nr_pages() into folio_large_nr_pages()
Let's factor it out into a simple helper function. This helper will also come in handy when working with code where we know that our folio is large. While at it, let's consistently return a "long" value from all these similar functions. Note that we cannot use "unsigned int" (even though _folio_nr_pages is of that type), because it would break some callers that do stuff like "-folio_nr_pages()". Both "int" or "unsigned long" would work as well. Maybe in the future we'll have the nr_pages readily available for all large folios, maybe even for small folios, or maybe for none. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Kirill A. Shutemov <[email protected]> Cc: Andy Lutomirks^H^Hski <[email protected]> Cc: Borislav Betkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jann Horn <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Lance Yang <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Matthew Wilcow (Oracle) <[email protected]> Cc: Michal Koutn <[email protected]> Cc: Muchun Song <[email protected]> Cc: tejun heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Zefan Li <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/page_alloc.c')
0 files changed, 0 insertions, 0 deletions