Re: [PATCH] memory hotplug disable boot option

Dave Hansen
2010-07-02T16:15:35Z

On Thu, 2010-07-01 at 09:31 +0900, KAMEZAWA Hiroyuki wrote:
>
> Considering briefly, how about this compact layout ?
>
> /sys/devices/system/memory/:
> list, hide, show, memoryX...
>
> list: // show available memory index list.
> #cat list
> 0 1 2 ....10000...
>
> show: //an interface to enable the interface.
> #echo INDEX > memory_index
> will create memoryINDEX diretory.
>
> hide: //an interface to hide the interface.
> #echo INDEX > memory_hide
> will remove memoryINDEX sysfs directory.

I was thinking more along the lines of just taking adjacent sections and
merging them. We'll need a new "end address" or size file. Maybe
"end_phys_index" or something similar.

Such a beast would not fix all of the pathological cases, like where
only every other 16MB section is populated with RAM, but I don't think
those are very common at all, especially in cases where there's a lot of
RAM. But, it also has a chance of being relatively backward-compatible.
In most cases, we may even be able to calculate a new phys_block_size
where everything fits evenly and be fully backward-compatible with the
old ABI.

-- Dave