lc_del(9)
π lc_del(9) β the kernel API manual, bestie edition π
okay so you're here for lc_del(9), which lives in the Kernel API Manual (section 9, kernel-land, very main character of it). Let's get into it β¨
πΈ NAME πΈ
lc_del β literally just removes an element from the cache. that's the whole gig π
β¨ SYNOPSIS β¨
void lc_del (struct lru_cache *lc , struct lc_element *e );
π¦ ARGUMENTS π¦
lcβ thelru_cacheobject. the cache in question, the vibe container πeβ the element to remove. the one getting evicted, no cap π«Ά
π₯ DESCRIPTION π₯
so here's the tea: e must be unused (refcnt == 0). that's a hard requirement, not a suggestion, ngl π
what it does, in order:
- moves
efrom the"lru"list to the"free"list - sets
e->enrtoLC_FREE
that's it. that's the whole function. iconic efficiency β
β οΈ fr fr remember:emust be unused βrefcnt == 0. don't come at it with a live element π
π SEE ALSO π
kernel file ./lib/lru_cache.c β that's where the magic lives π
lc_create(9), lc_destroy(9), lc_reset(9), lc_seq_printf_stats(9), lc_find(9), lc_is_used(9), lc_get(9), lc_get_cumulative(9), lc_try_get(9), lc_committed(9), lc_put(9), lc_element_by_index(9), lc_seq_dump_details(9) β the whole friend group, go read them too π§
made with love from ./lib, dated October 2026 π that's the source/version and date sign-off, bestie β go forth and delete responsibly π
β¨
π¦ 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