offline_and_...emory_ranges(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is the Kernel API Manual page for offline_and_...emory_ranges(9) β€” and the function is literally offline_and_remove_memory_ranges β€” offline and remove multiple memory ranges ✨.

✨ SYNOPSIS ✨

int offline_and_remove_memory_ranges (const struct range *ranges , unsigned int nr_ranges );

πŸŽ€ ARGUMENTS πŸŽ€

  • ranges β€” array of physical address ranges to offline and remove 🫢
  • nr_ranges β€” number of entries in ranges πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is the group project that actually works: she offlines and removes several memory ranges as one operation, serialized against other hotplug operations by a single lock_device_hotplug πŸ”₯.

The order is the whole vibe: this offlines all ranges before removing any of them. If offlining any range fails, the entire process is reverted and nothing is removed 😭. That gives you a fully atomic semantic for unplugging an entire device β€” no half-unplugged chaos, periodt.

Each range must be memory-block aligned in start and size β€” that is not optional, bestie πŸŽ€.

🌸 RETURN 🌸

  • 0 on success πŸŽ‰
  • negative errno on failure (never positive) πŸ’€

On failure, no range has been removed. Highkey iconic safety behavior, honestly.

πŸ”₯ SEE ALSO πŸ”₯


kisses bestie, that’s the whole page πŸ’‹ β€” source/version ./mm, date October 2026, and the manual page is offline_and_...emory_ranges(9) 🫢✨

πŸ“¦ where this page comes from