xas_split(9)
π xas_split (section 9, Kernel API Manual, bestie)
okay so welcome to xas_split(9) β it lives in the Kernel API Manual and it's literally the glow-up function for XArray entries. it takes one big multi-index entry and splits it into smaller ones. iconic behavior, no notes.
β¨ NAME β¨
xas_split β split a multi-index entry into smaller entries. that's it, that's the whole job, and she does it slayfully π
π SYNOPSIS π
void xas_split (struct xa_state *xas , void *entry , unsigned int order );
yes the spacing is exactly like that, don't come for me, I'm keeping it verbatim fr fr.
πΈ ARGUMENTS πΈ
xasβ the XArray operation state. this is the main character of the whole call, she's carrying the context π«Άentryβ the new entry you wanna store in the array. the fresh fit being handed out πorderβ the current entry order. yes, order matters, it always does π
π¦ DESCRIPTION π¦
so here's the tea: the size of the new entries is set inside xas β that's where the info lives, not in a separate argument, okay?
and the value sitting in entry? it gets copied to all the replacement entries. every single one. nobody gets left out, we love equal distribution in this house β¨
tl;dr β you give her a state, an entry, and an order, and she multiplies that entry into smaller ones with the size info she already had. periodt.
π₯ CONTEXT π₯
any context works β she's flexible like that, lowkey applies anywhere π§
but the caller should hold the xa_lock. that's not a suggestion bestie, that's the vibe check you gotta pass before you call her ππ
π SEE ALSO π
the whole xarray.c friend group, in original order, because I would never do them dirty by reordering:
xas_load(9)xas_nomem(9)xas_free_nodes(9)xas_create_range(9)xas_store(9)xas_get_mark(9)xas_set_mark(9)xas_clear_mark(9)xas_init_marks(9)xas_split_alloc(9)xas_try_split_min_order(9)xas_try_split(9)xas_pause(9)xas_find(9)xas_find_marked(9)xas_find_conflict(9)xa_load(9)__xa_erase(9)xa_erase(9)__xa_store(9)xa_store(9)__xa_cmpxchg(9)__xa_insert(9)xa_store_range(9)xas_get_order(9)xa_get_order(9)__xa_alloc(9)__xa_alloc_cyclic(9)__xa_set_mark(9)__xa_clear_mark(9)xa_get_mark(9)xa_set_mark(9)xa_clear_mark(9)xa_find(9)xa_find_after(9)xa_extract(9)xa_delete_node(9)xa_destroy(9)
the source file for all this magic is the kernel file ./lib/xarray.c β go read her, she ate ππ₯
mwah, that's the whole page. written under ./lib, dated October 2026, and yes I'm signing off with a kiss because she deserves it π
π¦ 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