Re: [RFC v8 PATCH 04/20] memory-hotplug: offline and remove memory when removing the memory device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [RFC v8 PATCH 04/20] memory-hotplug: offline and remove memory when removing the memory device
- From: Wen Congyang <wency@xxxxxxxxxxxxxx>
- Date: Mon, 03 Sep 2012 09:30:51 +0800
- Cc: x86@xxxxxxxxxx, linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, cmetcalf@xxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, rientjes@xxxxxxxxxx, liuj97@xxxxxxxxx, len.brown@xxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, cl@xxxxxxxxx, minchan.kim@xxxxxxxxx, kosaki.motohiro@xxxxxxxxxxxxxx, isimatu.yasuaki@xxxxxxxxxxxxxx
- In-reply-to: <20120831135514.2a2dc0d4.akpm@linux-foundation.org>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1346148027-24468-1-git-send-email-wency@cn.fujitsu.com> <1346148027-24468-5-git-send-email-wency@cn.fujitsu.com> <20120831135514.2a2dc0d4.akpm@linux-foundation.org>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4
At 09/01/2012 04:55 AM, Andrew Morton Wrote:
> On Tue, 28 Aug 2012 18:00:11 +0800
> wency@xxxxxxxxxxxxxx wrote:
>
>> +int remove_memory(int nid, u64 start, u64 size)
>> +{
>> + int ret = -EBUSY;
>> + lock_memory_hotplug();
>> + /*
>> + * The memory might become online by other task, even if you offine it.
>> + * So we check whether the cpu has been onlined or not.
>
> I think you meant "memory", not "cpu".
Yes. I will fix it.
Thanks
Wen Congyang
>
> Actually, "check whether any part of this memory range has been
> onlined" would be better. If that is accurate ;)
>
>> + */
>> + if (!is_memblk_offline(start, size)) {
>> + pr_warn("memory removing [mem %#010llx-%#010llx] failed, "
>> + "because the memmory range is online\n",
>> + start, start + size);
>> + ret = -EAGAIN;
>> + }
>> +
>> + unlock_memory_hotplug();
>> + return ret;
>> +
>> +}
>> +EXPORT_SYMBOL_GPL(remove_memory);
>
--
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]