Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-16 Thread Dave Hansen
On Fri, 2010-07-16 at 13:23 -0500, Nathan Fontenot wrote: > >> -if (mem->state != from_state_req) { > >> -ret = -EINVAL; > >> -goto out; > >> +list_for_each_entry(mbs, &mem->sections, next) { > >> +if (mbs->state != from_state_req) > >> +

Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-16 Thread Dave Hansen
On Fri, 2010-07-16 at 13:23 -0500, Nathan Fontenot wrote: > > If the memory_block's state was inferred to be the same as each > > memory_block_section, couldn't we just keep a start and end phys_index > > in the memory_block, and get away from having memory_block_sections at > > all? > > Oooohhh..

Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-16 Thread Nathan Fontenot
On 07/16/2010 12:15 PM, Dave Hansen wrote: > On Thu, 2010-07-15 at 13:37 -0500, Nathan Fontenot wrote: >> @@ -123,13 +130,20 @@ >> static ssize_t show_mem_removable(struct sys_device *dev, >> struct sysdev_attribute *attr, char *buf) >> { >> +struct memory_block *mem; >>

Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-16 Thread Dave Hansen
On Thu, 2010-07-15 at 13:37 -0500, Nathan Fontenot wrote: > @@ -123,13 +130,20 @@ > static ssize_t show_mem_removable(struct sys_device *dev, > struct sysdev_attribute *attr, char *buf) > { > + struct memory_block *mem; > + struct memory_block_section *mbs; > u

Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-16 Thread Nathan Fontenot
Thanks for taking a look a this Kame, answers below... -Nathan On 07/15/2010 07:06 PM, KAMEZAWA Hiroyuki wrote: > On Thu, 15 Jul 2010 13:37:51 -0500 > Nathan Fontenot wrote: > >> Split the memory_block struct into a memory_block >> struct to cover each sysfs directory and a new memory_block_sec

Re: [PATCH 1/5] v2 Split the memory_block structure

2010-07-15 Thread KAMEZAWA Hiroyuki
On Thu, 15 Jul 2010 13:37:51 -0500 Nathan Fontenot wrote: > Split the memory_block struct into a memory_block > struct to cover each sysfs directory and a new memory_block_section > struct for each memory section covered by the sysfs directory. > This change allows for creation of memory sysfs di

[PATCH 1/5] v2 Split the memory_block structure

2010-07-15 Thread Nathan Fontenot
Split the memory_block struct into a memory_block struct to cover each sysfs directory and a new memory_block_section struct for each memory section covered by the sysfs directory. This change allows for creation of memory sysfs directories that can span multiple memory sections. This can be benef