KEXEC HANDOVER RADIX TREE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Kexec Handover Radix Tree β€” bestie, this is a radix tree implementation for tracking numeric keys across kexec transitions, and it's kind of iconic ✨

🌈 DESCRIPTION 🌈

Okay so picture this: it's a radix tree that keeps tabs on numeric keys while you cross over a kexec transition. It was developed for the KHO preserved memory map, but ngl it's designed for broader use by any subsystem that needs to track keys. So it's not just a one-trick pony, she's versatile πŸ’…

Conceptually speaking, the data structure is similar to a set. It tracks the presence or absence of numeric keys. That's the whole vibe β€” in or out, no extra baggage πŸŽ€

Structurally? The radix tree is a multi-level tree where leaf nodes are bitmaps representing individual keys. Multi-level, so you know she's got layers πŸ‘‘

Now for the KHO preserved memory map, to allow pages of different sizes (orders) to be stored efficiently in a single tree, it uses a unique key encoding scheme πŸ”₯ Each key is an unsigned long that combines a page's physical address and its order. One key, two facts, zero waste β€” that's the encoding slay.

πŸ’€ Real talk though: client code is responsible for allocating the root node of the tree, initializing the mutex lock, and managing its lifecycle. That's on you, not on the tree. She's lowkey not going to do it for you.

And you must use the tree data structures defined in the KHO ABI, include/linux/kho/abi/kexec_handover.h β€” like, not optional, no cap 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./include/linux/kho_radix_tree.h
  • struct kho_radix_walk_cb(9)

Okay that's the whole page bestie, go track some keys πŸ“ Coming at you from ./include/linux, dated October 2026 β€” mwah, bye βœ¨πŸ’œπŸ§š

πŸ“¦ where this page comes from