dax_kmem_do_hotremove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dax_kmem_do_hotremove β€” the kernel API manual, section 9, bestie

okay so welcome to dax_kmem_do_hotremove(9) β€” it's a real one from the Kernel API Manual (section 9, the fancy kernel-functions section, iykyk) and honestly? she's giving cleanup era. let's get into it πŸŽ€


✨ NAME ✨

dax_kmem_do_hotremove β€” hot-remove memory for dax kmem device. that's it, that's the whole vibe: we're taking memory out of a dax kmem device, live, no shutdown, no drama 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

int dax_kmem_do_hotremove (struct dev_dax *dev_dax , struct
dax_kmem_data *data );

so she takes two things and hands you back an int. classic. πŸ’œ


🌈 ARGUMENTS 🌈

  • dev_dax β€” the dev_dax instance. like, the actual device we're doing this whole hot-remove situation to 🫢
  • data β€” the dax_kmem_data structure with resource tracking. she's the one keeping receipts on the resources, so don't lose her.

πŸ”₯ DESCRIPTION πŸ”₯

okay so this is the important part, listen up bestie πŸ‘‘

dax_kmem_do_hotremove offlines and removes every currently-added range in the dev_dax region atomically. and when I say atomically I mean it fr fr: either all ranges are offlined and removed, or none are β€” and in that case the device is returned to its prior state. all-or-nothing. no half-finished messes, no "oops we removed three out of five ranges," none of that πŸ’…

it returns 0 on success, or a negative errno on failure. so like, check that return value, bestie, don't just vibe past it 😭


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/dax/kmem.c β€” that's the main character, that's where she lives. and also go say hi to her friends:


🧚 little reminder: this whole thing is atomic, so if any part of the removal fails, nothing gets removed. the device goes right back to how it was. iconic behaviour honestly.

and that's the page!! sourced from ./drivers/dax, October 2026, dax_kmem_do_hotremove(9) β€” slay, go hot-remove some memory responsibly, mwah πŸ’–β­πŸŽ€

πŸ“¦ where this page comes from