Thread (25 messages) 25 messages, 3 authors, 2012-09-06

Re: [RFC PATCH V6 04/19] memory-hotplug: offline and remove memory when removing the memory device

From: Vasilis Liaskovitis <hidden>
Date: 2012-08-09 15:41:37
Also in: linux-acpi, linux-mm, linux-s390, linux-sh, lkml

Hi,
We should offline and remove memory when removing the memory device.
The memory device can be removed by 2 ways:
1. send eject request by SCI
2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject
[snip]
+
+static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
+{
+       int result;
+
+       /*
+        * Ask the VM to offline this memory range.
+        * Note: Assume that this function returns zero on success
+        */
+       result = acpi_memory_device_remove_memory(mem_device);
+
here we should check the result of acpi_memory_device_remove_memory()
and not continue if it failed.
        /* Power-off and eject the device */
        result = acpi_memory_powerdown_device(mem_device);
        if (result) {
thanks,

- Vasilis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help