folio_check_splittable(9)
π folio_check_splittable(9) β the Kernel API Manual, but make it cute
okay bestie, gather round, because today we're looking at folio_check_splittable, straight out of the Kernel API Manual (section 9, kernel girlies rise). it's giving "small function, big responsibility" and honestly? we love her for it. π
β¨ NAME β¨
folio_check_splittable β literally just checks if a folio can be split down to a given order. that's it. that's the whole vibe check. π¦
πΈ SYNOPSIS πΈ
int folio_check_splittable (struct folio *folio , unsigned int new_order
, enum split_type split_type );
look at her. three params, one int, zero drama. β¨
π ARGUMENTS π
folioβ the folio we're trying to split, bestie. this is our main character. πnew_orderβ the smallest order of the after-split folios. and like, lowkey important context here: buddy allocatorβstyle splitting generates folios with orders all the way from the folio's order- 1down tonew_order, so this isn't just "one number," it's the floor of a whole lil cascade. πsplit_typeβ uniform or non-uniform split. pick your fighter. π
π«Ά DESCRIPTION π«Ά
so folio_check_splittable checks whether folio can actually be split to new_order using the split_type method. that's the tea. π
β οΈ and bestie, do NOT skip this: the truncated folio check must come first. like, before you do anything else. it's a prerequisite, not a suggestion. π
π₯ CONTEXT π₯
folio must be locked. no cap. lock your folio before you come to this function, or you're gonna have a bad time. π
β RETURN β
0β slay, the folio can be split tonew_orderβ- otherwise β an error number gets returned π (no zero, no party)
π§ SEE ALSO π§
all the kernel file besties from ./mm/huge_memory.c, linking arms in a little conga line:
vmf_insert_pfn_pmd(9)vmf_insert_pfn_pud(9)vmf_insert_folio_pud(9)touch_pmd(9)zap_huge_pmd(9)__split_unmapped_folio(9)__folio_split(9)folio_split_unmapped(9)folio_split(9)min_order_for_split(9)
iykyk. go read them. obsessed with all of them fr fr. π
kisses and good vibes from ./mm π«Ά β this iconic little page is dated October 2026, and it lives in folio_check_splittable(9) forever. periodt. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms