Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-13 Thread Yasuaki Ishimatsu
On Mon, 9 May 2016 12:53:38 -0500 Reza Arbab wrote: > When memory is onlined, we are only able to rezone from ZONE_MOVABLE to > ZONE_KERNEL, or from (ZONE_MOVABLE - 1) to ZONE_MOVABLE. > > To be more flexible, use the following criteria instead; to online memory > from zone X into zone Y, > >

Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-13 Thread Yasuaki Ishimatsu
On Wed, 11 May 2016 14:23:26 -0500 Reza Arbab wrote: > On Wed, May 11, 2016 at 08:17:41AM -0700, Yasuaki Ishimatsu wrote: > >On Tue, 10 May 2016 15:39:43 -0500 > >Reza Arbab wrote: > > > >> + if (idx < target) { > >> + /* pages must be at end of current zone */ > >> + if (pfn

Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-11 Thread Reza Arbab
On Wed, May 11, 2016 at 08:17:41AM -0700, Yasuaki Ishimatsu wrote: On Tue, 10 May 2016 15:39:43 -0500 Reza Arbab wrote: + if (idx < target) { + /* pages must be at end of current zone */ + if (pfn + nr_pages != zone_end_pfn(zone)) + retur

Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-11 Thread Yasuaki Ishimatsu
On Tue, 10 May 2016 15:39:43 -0500 Reza Arbab wrote: > On Tue, May 10, 2016 at 11:08:56AM -0700, Yasuaki Ishimatsu wrote: > >On Mon, 9 May 2016 12:53:38 -0500 > >Reza Arbab wrote: > >> * If X is lower than Y, the onlined memory must lie at the end of X. > >> * If X is higher than Y, the online

Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-10 Thread Reza Arbab
On Tue, May 10, 2016 at 11:08:56AM -0700, Yasuaki Ishimatsu wrote: On Mon, 9 May 2016 12:53:38 -0500 Reza Arbab wrote: * If X is lower than Y, the onlined memory must lie at the end of X. * If X is higher than Y, the onlined memory must lie at the start of X. If memory address has hole, memo

Re: [PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-10 Thread Yasuaki Ishimatsu
On Mon, 9 May 2016 12:53:38 -0500 Reza Arbab wrote: > When memory is onlined, we are only able to rezone from ZONE_MOVABLE to > ZONE_KERNEL, or from (ZONE_MOVABLE - 1) to ZONE_MOVABLE. > > To be more flexible, use the following criteria instead; to online memory > from zone X into zone Y, > >

[PATCH 2/3] memory-hotplug: more general validation of zone during online

2016-05-09 Thread Reza Arbab
When memory is onlined, we are only able to rezone from ZONE_MOVABLE to ZONE_KERNEL, or from (ZONE_MOVABLE - 1) to ZONE_MOVABLE. To be more flexible, use the following criteria instead; to online memory from zone X into zone Y, * Any zones between X and Y must be unused. * If X is lower than Y, t