[lkml]   [2018]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] memory_hotplug: fix the panic when memory end is not on the section boundary
On Mon, 10 Sep 2018 15:26:55 +0000
Pasha Tatashin <> wrote:

> I agree memoryblock is a hack, it fails to do both things it was
> designed to do:
> 1. On bare metal you cannot free a physical dimm of memory using
> memoryblock granularity because memory devices do not equal to physical
> dimms. Thus, if for some reason a particular dimm must be
> remove/replaced, memoryblock does not help us.
> 2. On machines with hypervisors it fails to provide an adequate
> granularity to add/remove memory.
> We should define a new user interface where memory can be added/removed
> at a finer granularity: sparse section size, but without a memory
> devices for each section. We should also provide an optional access to
> legacy interface where memory devices are exported but each is of
> section size.
> So, when legacy interface is enabled, current way would work:
> echo offline > /sys/devices/system/memory/memoryXXX/state
> And new interface would allow us to do something like this:
> echo offline 256M > /sys/devices/system/node/nodeXXX/memory
> With optional start address for offline memory.
> echo offline [start_pa] size > /sys/devices/system/node/nodeXXX/memory
> start_pa and size must be section size aligned (128M).
> It would probably be a good discussion for the next MM Summit how to
> solve the current memory hotplug interface limitations.

Please keep lsmem/chmem from util-linux in mind, when changing the
memory hotplug user interface.

 \ /
  Last update: 2018-09-12 16:30    [W:0.093 / U:3.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site