Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-28 Thread Ni zhan Chen
On 09/28/2012 03:29 PM, Lai Jiangshan wrote: Hi, Chen, On 09/27/2012 09:19 PM, Ni zhan Chen wrote: On 09/27/2012 02:47 PM, Lai Jiangshan wrote: The __add_zone() maybe call sleep-able init_currently_empty_zone() to init wait_table, But this function also modifies the zone_start_pfn without any

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-28 Thread Lai Jiangshan
Hi, Chen, On 09/27/2012 09:19 PM, Ni zhan Chen wrote: > On 09/27/2012 02:47 PM, Lai Jiangshan wrote: >> The __add_zone() maybe call sleep-able init_currently_empty_zone() >> to init wait_table, >> >> But this function also modifies the zone_start_pfn without any lock. >> It is bugy. >> >> So we mo

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-28 Thread Lai Jiangshan
Hi, KOSAKI On 09/28/2012 06:30 AM, KOSAKI Motohiro wrote: > (9/27/12 2:47 AM), Lai Jiangshan wrote: >> The __add_zone() maybe call sleep-able init_currently_empty_zone() >> to init wait_table, > > This doesn't explain why sleepable is critical important. I think sleepable > is jsut unrelated. The

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-27 Thread KOSAKI Motohiro
(9/27/12 2:47 AM), Lai Jiangshan wrote: > The __add_zone() maybe call sleep-able init_currently_empty_zone() > to init wait_table, This doesn't explain why sleepable is critical important. I think sleepable is jsut unrelated. The fact is only: to write zone->zone_start_pfn require zone_span_writel

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-27 Thread Ni zhan Chen
On 09/27/2012 02:47 PM, Lai Jiangshan wrote: The __add_zone() maybe call sleep-able init_currently_empty_zone() to init wait_table, But this function also modifies the zone_start_pfn without any lock. It is bugy. So we move this modification out, and we ensure the modification of zone_start_pfn

[PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-27 Thread Lai Jiangshan
The __add_zone() maybe call sleep-able init_currently_empty_zone() to init wait_table, But this function also modifies the zone_start_pfn without any lock. It is bugy. So we move this modification out, and we ensure the modification of zone_start_pfn is only done with zone_span_writelock() held o