lc_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 in lc_seq_printf_stats and lc_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 the struct lc_element member 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:


mwah πŸ’‹ β€” straight from ./lib, October 2026, and that's the lc_create(9) moment. 🫢

πŸ“¦ where this page comes from