folio_lruvec_lock_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ folio_lruvec_lock_irq ✨

okay so bestie, we're in the Kernel API Manual today and this page is lowkey a lil baddie πŸŽ€ it's giving "one job, does it flawlessly." let's get into it πŸ’…


🌸 NAME 🌸

folio_lruvec_lock_irq β€” Lock the lruvec for a folio.

yes that's it. that's the whole name. short, iconic, no notes πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct lruvec * folio_lruvec_lock_irq (struct folio *folio );

that's the whole signature fr fr β€” copy it exactly, don't be cute with it πŸ™ˆ


πŸ’– ARGUMENTS πŸ’–

  • folio β€” Pointer to the folio. that's the whole thing, just a pointer to your folio, she's not complicated 🫢

🌈 DESCRIPTION 🌈

okay so the important part: these functions are safe to use under any of the following conditions πŸ‘‡ (and yes, the page says "functions" plural, that's not a typo on my end, i'm just relaying the lore πŸ’€)

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

that's the vibe check βœ… meet any one of those and you're golden. no cap.


πŸ‘‘ RETURN πŸ‘‘

so what do you get back? you get the lruvec that this folio is on, and it comes with:

  • its lock held πŸ”
  • interrupts disabled ⚑
  • and the rcu read lock held 🧚

like, it returns the whole package deal, lock and all, main character energy fr πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

so there's a lot of lore here, and it all lives in the kernel file ./mm/memcontrol.c β€” go read up on your faves:

like i said. a LOT. but honestly? slay for her, she's connected πŸ’…βœ¨


mwah, that's the whole page πŸŽ€ this lil drop comes to you straight from ./mm and is dated October 2026 β€” go lock something safely, bestie, and remember: interrupts disabled means interrupts disabled 😭🫢

πŸ“¦ where this page comes from