folio_lruvec_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_lruvec_lock(9) β€” like, the kernel API manual, bestie

okay so here's the tea: this is the man page for folio_lruvec_lock, straight out of the Kernel API Manual. Sit down, grab a boba, we're locking lruvecs 🫢


✨ NAME ✨

folio_lruvec_lock β€” locks the lruvec for a folio. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

struct lruvec * folio_lruvec_lock (struct folio *folio );

πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” a pointer to the folio. just a pointer. pointing at a folio. iconic behavior honestly πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so these functions are safe to use under any of the following conditions, no cap:

  • folio locked πŸ”’
  • folio_test_lru is false
  • folio frozen (refcount of 0) 🧊

like, those are your green lights. if you're chilling in any one of those situations, you're good 😌


πŸ¦‹ RETURN πŸ¦‹

returns the lruvec this folio is on β€” with its lock held and the rcu read lock held too. two locks, one return value, main character energy fr fr ✨


🌈 SEE ALSO 🌈

the kernel file lives at ./mm/memcontrol.c, and it's friends with literally everybody:

like, that's a whole group chat right there 😭


okay that's the page!! it's from ./mm, dated October 2026, and yeah β€” that's the whole folio_lruvec_lock(9) situation. go forth and lock responsibly, bestie πŸ’œπŸ§š

πŸ“¦ where this page comes from