list_lru_add_obj(9)
π list_lru_add_obj(9) π
okay bestie, welcome to the Kernel API Manual β¨ β yes this is a section 9 page, yes it's about the kernel, and yes you're gonna get it. this one's list_lru_add_obj, and it's lowkey one of the cutest little helpers in the LRU-verse π¦
πΈ NAME πΈ
list_lru_add_obj β add an element to the lru list's tail π
like, it literally does what it says on the tin. element goes in, at the tail, no drama π
β¨ SYNOPSIS β¨
bool list_lru_add_obj (struct list_lru *lru , struct list_head *item );
that's it. that's the whole vibe check π₯ returns a bool, takes two pointers, slays.
π ARGUMENTS π
lruβ the lru pointer π«Ά this is your list, your main character. hand it over and it'll do the thing.itemβ the item to be added. yes, the actual thing going on the list. icon behavior π
π DESCRIPTION π
so here's the tea β β this function is similar to list_lru_add, but with a little twist: the NUMA node and the memcg of the sublist are determined by the item's list_head, not by you passing them in. it just knows. iykyk π§
and this assumption is valid for slab objects LRU such as dentries, inodes, etc. β so if that's your situation, you're so good, no cap π
ngl, key word here is assumption β it holds for slab objects LRU like the ones listed above. that's the contract, bestie, don't come for it π
β RETURN β
trueβ the list was updated π slay, it workedfalseβ otherwise π the list was not updated
π¦ SEE ALSO π¦
Kernel file ./include/linux/list_lru.h β go read it, it's giving lore π
and these icons, all in their natural habitat:
folio_memcg_list_lru_alloc(9)list_lru_lock(9)list_lru_unlock(9)list_lru_add(9)list_lru_del(9)list_lru_del_obj(9)list_lru_count_one(9)list_lru_walk_one(9)list_lru_walk_one_irq(9)
and that's the page, bestie π«Ά this little gem comes straight from the ./include/linux corner of the kernel tree, dated October 2026 β go add some objects to some tails, you've got this π
β¨π
π¦ 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