From f523972d1c1f4da04c90c50d8544da1f81d38e9f Mon Sep 17 00:00:00 2001 From: Umair Khurshid <87898890+Umair-khurshid@users.noreply.github.com> Date: Wed, 14 May 2025 11:03:25 +0500 Subject: [PATCH] chmem: add page (#16476) Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/linux/chmem.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pages/linux/chmem.md diff --git a/pages/linux/chmem.md b/pages/linux/chmem.md new file mode 100644 index 0000000000..15d14d9472 --- /dev/null +++ b/pages/linux/chmem.md @@ -0,0 +1,29 @@ +# chmem + +> Modify the state of memory blocks (online or offline) in a Linux system. +> Typically used in virtualized environments to manage memory hotplug. +> More information: . + +- Set a memory block offline: + +`sudo chmem {{[-b|--block]}} {{[-d|--disable]}} {{block_number}}` + +- Set a memory block online: + +`sudo chmem {{[-b|--block]}} {{[-e|--enable]}} {{block_number}}` + +- Set a memory range offline using hexadecimal addresses: + +`sudo chmem {{[-d|--disable]}} 0x{{start_address}}-0x{{end_address}}` + +- Set a memory range online using hexadecimal addresses: + +`sudo chmem {{[-e|--enable]}} 0x{{start_address}}-0x{{end_address}}` + +- Set memory online and assign it to a specific zone (e.g., Movable): + +`sudo chmem {{[-e|--enable]}} 0x{{start_address}} {{[-z|--zone]}} {{Movable}}` + +- Display help: + +`chmem {{[-h|--help]}}`