folio_check_splittable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 - 1 down to new_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 to new_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:

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