Re: [RFC PATCH V6 04/19] memory-hotplug: offline and remove memory when removing the memory device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: wency@xxxxxxxxxxxxxx
- Subject: Re: [RFC PATCH V6 04/19] memory-hotplug: offline and remove memory when removing the memory device
- From: Vasilis Liaskovitis <vasilis.liaskovitis@xxxxxxxxxxxxxxxx>
- Date: Thu, 9 Aug 2012 17:41:04 +0200
- Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, cmetcalf@xxxxxxxxxx, rientjes@xxxxxxxxxx, liuj97@xxxxxxxxx, len.brown@xxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, cl@xxxxxxxxx, minchan.kim@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, kosaki.motohiro@xxxxxxxxxxxxxx, isimatu.yasuaki@xxxxxxxxxxxxxx
- In-reply-to: <1343980161-14254-5-git-send-email-wency@cn.fujitsu.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1343980161-14254-1-git-send-email-wency@cn.fujitsu.com> <1343980161-14254-5-git-send-email-wency@cn.fujitsu.com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]