lc_create(9)
π lc_create(9) π
okay bestie, welcome to the Kernel API Manual β we're talking about lc_create, and it's giving βlet's get this cache tracker set upβ energy. β¨
πΈ NAME πΈ
lc_create β prepares to track objects in an active set π«Ά
π SYNOPSIS π
struct lru_cache * lc_create (const char *name , struct kmem_cache *cache , unsigned max_pending_changes , unsigned e_count , size_t e_size , size_t e_off );
π ARGUMENTS π
nameβ a descriptive name, and literally only used inlc_seq_printf_statsandlc_seq_dump_details. It's the nickname, not the whole personality. πcacheβ the cache root pointer. π±max_pending_changesβ the maximum changes to accumulate until a transaction is required. Basically the βhow much chaos before we need a commit momentβ limit. πe_countβ number of elements allowed to be active simultaneously. π―ββοΈe_sizeβ size of the tracked objects. πe_offβ offset to thestruct lc_elementmember in a tracked object. π
π¦ DESCRIPTION π¦
Returns a pointer to a newly initialized struct lru_cache on success, or NULL on (allocation) failure. That's it, that's the vibe check: got a fresh cache pointer? slay. Got NULL? allocation said no. π
π₯ SEE ALSO π₯
The kernel file is ./lib/lru_cache.c, and the rest of the squad is:
lc_destroy(9)lc_reset(9)lc_seq_printf_stats(9)lc_find(9)lc_is_used(9)lc_del(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)
mwah π β straight from ./lib, October 2026, and that's the lc_create(9) moment. π«Ά
π¦ 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