[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <630a8785-222d-26ed-a57a-ac5b58d7a04d@redhat.com>
Date: Tue, 19 Jan 2021 13:27:53 +0100
From: David Hildenbrand <david@...hat.com>
To: Anshuman Khandual <anshuman.khandual@....com>, linux-mm@...ck.org,
akpm@...ux-foundation.org, hca@...ux.ibm.com,
catalin.marinas@....com
Cc: Oscar Salvador <osalvador@...e.de>,
Vasily Gorbik <gor@...ux.ibm.com>,
Will Deacon <will@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
Mark Rutland <mark.rutland@....com>,
linux-arm-kernel@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Pankaj Gupta <pankaj.gupta.linux@...il.com>,
Michal Hocko <mhocko@...nel.org>,
Wei Yang <richard.weiyang@...ux.alibaba.com>,
teawater <teawaterz@...ux.alibaba.com>,
Pankaj Gupta <pankaj.gupta@...ud.ionos.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range()
which memory we can hotplug
On 18.01.21 14:21, Anshuman Khandual wrote:
>
>
> On 1/18/21 6:43 PM, Anshuman Khandual wrote:
>> From: David Hildenbrand <david@...hat.com>
>>
>> Right now, we only check against MAX_PHYSMEM_BITS - but turns out there
>> are more restrictions of which memory we can actually hotplug, especially
>> om arm64 or s390x once we support them: we might receive something like
>> -E2BIG or -ERANGE from add_memory_driver_managed(), stopping device
>> operation.
>>
>> So, check right when initializing the device which memory we can add,
>> warning the user. Try only adding actually pluggable ranges: in the worst
>> case, no memory provided by our device is pluggable.
>>
>> In the usual case, we expect all device memory to be pluggable, and in
>> corner cases only some memory at the end of the device-managed memory
>> region to not be pluggable.
>>
>> Cc: "Michael S. Tsirkin" <mst@...hat.com>
>> Cc: Jason Wang <jasowang@...hat.com>
>> Cc: Pankaj Gupta <pankaj.gupta.linux@...il.com>
>> Cc: Michal Hocko <mhocko@...nel.org>
>> Cc: Oscar Salvador <osalvador@...e.de>
>> Cc: Wei Yang <richard.weiyang@...ux.alibaba.com>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: catalin.marinas@....com
>> Cc: teawater <teawaterz@...ux.alibaba.com>
>> Cc: Anshuman Khandual <anshuman.khandual@....com>
>> Cc: Pankaj Gupta <pankaj.gupta@...ud.ionos.com>
>> Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>> Cc: hca@...ux.ibm.com
>> Cc: Vasily Gorbik <gor@...ux.ibm.com>
>> Cc: Will Deacon <will@...nel.org>
>> Cc: Ard Biesheuvel <ardb@...nel.org>
>> Cc: Mark Rutland <mark.rutland@....com>
>> Cc: Heiko Carstens <hca@...ux.ibm.com>
>> Cc: Michal Hocko <mhocko@...nel.org>
>> Signed-off-by: David Hildenbrand <david@...hat.com>
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
>
> Hello David,
>
> As your original patch was in the RFC state, I have just maintained
> the same here as well. But once you test this patch along with the
> new series, please do let me know if this needs to be converted to
> a normal PATCH instead. Thank you.
I'll give it a churn on x86-64, where not that much should change. It
will be interesting to test with arm64 in such corner cases in the future.
Thanks
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists