radix_tree_...kup_tag_slot(9)
π radix_tree_gang_lookup_tag_slot(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual (yes, the (9) section, we're in kernel-land now πΈ) and it's all about radix_tree_gang_lookup_tag_slot and honestly? she's a baddie. let's get into it β¨
β¨ NAME β¨
radix_tree_gang_lookup_tag_slot β perform multiple slot lookup on a radix tree based on a tag π¦
like, you're grabbing a whole gang of slots (not just one, we're extra here) out of a radix tree, and the filter is a tag. very main character energy, no cap π
π₯ SYNOPSIS π₯
unsigned int radix_tree_gang_lookup_tag_slot (const struct
radix_tree_root *root , void __rcu ***results , unsigned long
first_index , unsigned int max_items , unsigned int tag );
that triple-pointer ***results is not a typo bestie, she's real, she's iconic, she's giving pointer inception π
π ARGUMENTS π
rootβ radix tree root. the actual tree you're digging through, your starting point, your home base π‘resultsβ where the results of the lookup are placed. this is the lil basket you're collecting your findings in π§Ίfirst_indexβ start the lookup from this key. you're not starting from the beginning, you're picking up from here πmax_itemsβ place up to this many items at*results. a hard cap, a limit, a "know when to stop" moment πtagβ the tag index (< RADIX_TREE_MAX_TAGS). important!! it's gotta be less thanRADIX_TREE_MAX_TAGSor like, don't π
π DESCRIPTION π
so what she does: Performs an index-ascending scan of the tree for present items which have the tag indexed by tag set. π¦
read that again. index-ascending. she goes up, in order, scanning the tree, and she only picks up the present items that have that tag set. picky? no. selective. there's a difference π
then she Places the slots at *results β like, the actual slots, not just the items, okay, that's important β and returns the number of slots which were placed at *results. so the return value is literally "how many did I find and put in your basket" π§Ίβ¨ count them, that's your number, periodt.
π«Ά SEE ALSO π«Ά
the whole friend group, fr fr. first up, the Kernel file ./lib/radix-tree.c β that's where she lives, that's her address π β and then all her mutuals:
radix_tree_find_next_bit(9)radix_tree_shrink(9)__radix_tree_create(9)radix_tree_insert(9)__radix_tree_lookup(9)radix_tree_lookup_slot(9)radix_tree_lookup(9)__radix_tree_replace(9)radix_tree_replace_slot(9)radix_tree_iter_replace(9)radix_tree_tag_set(9)radix_tree_tag_clear(9)radix_tree_iter_tag_clear(9)radix_tree_tag_get(9)radix_tree_next_chunk(9)radix_tree_gang_lookup(9)radix_tree_gang_lookup_tag(9)radix_tree_iter_delete(9)radix_tree_delete_item(9)radix_tree_delete(9)radix_tree_tagged(9)idr_preload(9)idr_destroy(9)
ngl that's a lot of friends but she knows every single one of them by name ππ
a lil vibe check before you go:taghas to be< RADIX_TREE_MAX_TAGS. that's not a suggestion, that's the rule. respect it π
and that's the page!! sign-off time π β this came out of the ./lib source, dated October 2026, and it's the radix_tree_...kup_tag_slot(9) page, so yeah, the title got a lil truncated in the header and honestly she ate anyway π
β¨ go forth and gang-lookup, bestie π¦π
π¦ 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