Messages in this thread | | | Date | Wed, 3 Apr 2019 10:34:00 +0200 | From | Oscar Salvador <> | Subject | Re: [PATCH 0/4] mm,memory_hotplug: allocate memmap from hotadded memory |
| |
On Wed, Apr 03, 2019 at 10:12:32AM +0200, Michal Hocko wrote: > What does prevent calling somebody arch_add_memory for a range spanning > multiple memblocks from a driver directly. In other words aren't you > making assumptions about a future usage based on the qemu usecase?
Well, right now they cannot as it is not exported. But if we want to do it in the future, then yes, I would have to be more careful because I made the assumption that hot-add/hot-remove are working with the same granularity, which is the case right now.
Given said this, I think that something like you said before, giving the option to the caller to specify whether it wants vmemmaps per the whole hot-added range or per memblock is a reasonable thing to do. That way, there will not be a problem working with different granularities in hot-add/hot-remove operations and we would be on safe side.
-- Oscar Salvador SUSE L3
| |