memory_failure_queue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– memory_failure_queue(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” yeah the title is a whole mouthful but stick with me, this one's actually kinda iconic. we're looking at memory_failure_queue(9) and fr fr it's the function that handles your RAM having a bad day. 🫢


✨ NAME ✨

memory_failure_queue β€” schedule handling memory failure of a page. that's the whole vibe: a page goes bad, and this queues up the cleanup. πŸŽ€


🌸 SYNOPSIS 🌸

void memory_failure_queue (unsigned long pfn , int flags );

look at her. returns void, takes two args, no notes. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pfn β€” the Page Number of the corrupted page. yes, the corrupted one. the problem child. 😭
  • flags β€” flags for memory failure handling, i.e. the little knobs that tell it how to do the thing.

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea: this function gets called by the low level hardware error handler when it detects hardware memory corruption of a page. like, the hardware literally snitched on itself and this is who picks up the phone. πŸ’€

what it does is schedules the recovering of error page β€” and that recovering package includes dropping pages, killing processes, etc. yeah. etc. she contains multitudes. πŸ‘‘

the function is primarily of use for corruptions that happen outside the current execution context (e.g. when detected by a background scrubber), so it's the girl who handles the drama when you're not even in the room. ✨

and the best part? Can run in IRQ context. no cap, she's built different. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

all her besties, go read them too, iykyk πŸ“šπŸ’œ


and that's the page!! brought to you by the fine folks over at ./mm β€” source/version realness β€” dated October 2026, and yes she's still titled memory_failure_queue(9) because consistency is a slay. mwah, go fix that memory bestie πŸ’‹πŸŒΈπŸ§š

πŸ“¦ where this page comes from