MAPLE TREE FLAGS(9)
π³ Maple tree flags π³
okay bestie, welcome to the kernel API manual π this page is literally just the flag glossary for maple trees β the data structure, not the syrup kind (sadly π). it's giving "cheat sheet energy" and honestly? iconic. every flag, every mask, every constant, all right here. no cap, nothing skipped. π«Ά
β¨ THE FLAGS β¨
MT_FLAGS_ALLOC_RANGEβ tracks gaps in this tree π³οΈ like it's keeping receipts on where the empty spots areMT_FLAGS_USE_RCUβ operate in RCU mode β‘ the whole tree runs in RCU mode with this oneMT_FLAGS_HEIGHT_OFFSETβ the position of the tree height in the flags π that's where the height value lives inside the flagsMT_FLAGS_HEIGHT_MASKβ the mask for the maple tree height value π mask goes on, height value gets pulled outMT_FLAGS_LOCK_MASKβ how themt_lockis used π controls howmt_lockgets usedMT_FLAGS_LOCK_IRQβ acquired irq-safe π acquired irq-safe, bestieMT_FLAGS_LOCK_BHβ acquired bh-safe π¦ acquired bh-safe, no stress
π heads up:MT_FLAGS_LOCK_EXTERNmeansmt_lockis not used β so if you see that flag, don't go looking for the lock, it's not invited to the party π
MT_FLAGS_LOCK_EXTERNβmt_lockis not used π« the lock is simply not used hereMAPLE_HEIGHT_MAXβ the largest height that can be stored π the biggest height that can be stored, periodt
π SEE ALSO π
kernel file ./include/linux/maple_tree.h β go read it, it's the main character πβ¨
and then the whole friend group of references, all of them, in order, fr fr:
MTREE_INIT(9)MTREE_INIT_EXT(9)mtree_empty(9)mas_reset(9)mas_for_each(9)mas_for_each_rev(9)__mas_set_range(9)mas_set_range(9)mas_set(9)mt_init_flags(9)mt_init(9)mt_clear_in_rcu(9)mt_set_in_rcu(9)mt_for_each(9)
that's the whole page, bestie, you ate it up π this gem comes to you from ./include/linux and is dated October 2026 β so go forth, set those flags, and slay ππ
π¦ 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