Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-10 Thread Xie XiuQi
On 2015/3/11 9:12, Gu Zheng wrote: > Hi Xishi, > > What is the condition of this problem now? Hi Gu, I have no machine to do this test now. But I've tested the patch "just remove memset 0" more than 20 hours last week, it's OK. Thanks, Xie XiuQi > > Regards, > Gu > On 03/05/2015

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-10 Thread Gu Zheng
Hi Xishi, What is the condition of this problem now? Regards, Gu On 03/05/2015 05:39 PM, Xishi Qiu wrote: > On 2015/3/5 16:26, Gu Zheng wrote: > >> Hi Xishi, >> Could you please try the following one? >> It postpones the reset of obsolete pgdat from try_offline_node() to >> hotadd_new_pgdat(),

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-10 Thread Gu Zheng
Hi Xishi, What is the condition of this problem now? Regards, Gu On 03/05/2015 05:39 PM, Xishi Qiu wrote: On 2015/3/5 16:26, Gu Zheng wrote: Hi Xishi, Could you please try the following one? It postpones the reset of obsolete pgdat from try_offline_node() to hotadd_new_pgdat(), and just

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-10 Thread Xie XiuQi
On 2015/3/11 9:12, Gu Zheng wrote: Hi Xishi, What is the condition of this problem now? Hi Gu, I have no machine to do this test now. But I've tested the patch just remove memset 0 more than 20 hours last week, it's OK. Thanks, Xie XiuQi Regards, Gu On 03/05/2015 05:39 PM,

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Gu Zheng
Hi Xishi, On 03/05/2015 05:39 PM, Xishi Qiu wrote: > On 2015/3/5 16:26, Gu Zheng wrote: > >> Hi Xishi, >> Could you please try the following one? >> It postpones the reset of obsolete pgdat from try_offline_node() to >> hotadd_new_pgdat(), and just resetting pgdat->nr_zones and >>

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Xishi Qiu
On 2015/3/5 16:26, Gu Zheng wrote: > Hi Xishi, > Could you please try the following one? > It postpones the reset of obsolete pgdat from try_offline_node() to > hotadd_new_pgdat(), and just resetting pgdat->nr_zones and > pgdat->classzone_idx to be 0 rather than the whole reset by memset() > as

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Gu Zheng
Hi Xishi, Could you please try the following one? It postpones the reset of obsolete pgdat from try_offline_node() to hotadd_new_pgdat(), and just resetting pgdat->nr_zones and pgdat->classzone_idx to be 0 rather than the whole reset by memset() as Kame suggested. Regards, Gu ---

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Gu Zheng
Hi Xishi, Could you please try the following one? It postpones the reset of obsolete pgdat from try_offline_node() to hotadd_new_pgdat(), and just resetting pgdat-nr_zones and pgdat-classzone_idx to be 0 rather than the whole reset by memset() as Kame suggested. Regards, Gu ---

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Gu Zheng
Hi Xishi, On 03/05/2015 05:39 PM, Xishi Qiu wrote: On 2015/3/5 16:26, Gu Zheng wrote: Hi Xishi, Could you please try the following one? It postpones the reset of obsolete pgdat from try_offline_node() to hotadd_new_pgdat(), and just resetting pgdat-nr_zones and pgdat-classzone_idx to be

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-05 Thread Xishi Qiu
On 2015/3/5 16:26, Gu Zheng wrote: Hi Xishi, Could you please try the following one? It postpones the reset of obsolete pgdat from try_offline_node() to hotadd_new_pgdat(), and just resetting pgdat-nr_zones and pgdat-classzone_idx to be 0 rather than the whole reset by memset() as Kame

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Gu Zheng
On 03/04/2015 04:53 PM, Kamezawa Hiroyuki wrote: > On 2015/03/04 17:03, Xishi Qiu wrote: >> On 2015/3/4 11:56, Gu Zheng wrote: >> >>> Hi Xishi, >>> On 03/04/2015 10:52 AM, Xishi Qiu wrote: >>> On 2015/3/4 10:22, Xishi Qiu wrote: > On 2015/3/3 18:20, Gu Zheng wrote: > >> Hi

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Kamezawa Hiroyuki
On 2015/03/04 17:03, Xishi Qiu wrote: On 2015/3/4 11:56, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Xie XiuQi
On 2015/3/4 11:53, Gu Zheng wrote: > Hi Xishi, > > On 03/04/2015 10:22 AM, Xishi Qiu wrote: > >> On 2015/3/3 18:20, Gu Zheng wrote: >> >>> Hi Xishi, >>> On 03/03/2015 11:30 AM, Xishi Qiu wrote: >>> When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Xishi Qiu
On 2015/3/4 11:56, Gu Zheng wrote: > Hi Xishi, > On 03/04/2015 10:52 AM, Xishi Qiu wrote: > >> On 2015/3/4 10:22, Xishi Qiu wrote: >> >>> On 2015/3/3 18:20, Gu Zheng wrote: >>> Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: > When hot-remove a numa node, we will clear

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Xishi Qiu
On 2015/3/4 11:56, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Gu Zheng
On 03/04/2015 04:53 PM, Kamezawa Hiroyuki wrote: On 2015/03/04 17:03, Xishi Qiu wrote: On 2015/3/4 11:56, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Xie XiuQi
On 2015/3/4 11:53, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:22 AM, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-04 Thread Kamezawa Hiroyuki
On 2015/03/04 17:03, Xishi Qiu wrote: On 2015/3/4 11:56, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/4 11:53, Gu Zheng wrote: > Hi Xishi, > > On 03/04/2015 10:22 AM, Xishi Qiu wrote: > >> On 2015/3/3 18:20, Gu Zheng wrote: >> >>> Hi Xishi, >>> On 03/03/2015 11:30 AM, Xishi Qiu wrote: >>> When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: > On 2015/3/4 10:22, Xishi Qiu wrote: > >> On 2015/3/3 18:20, Gu Zheng wrote: >> >>> Hi Xishi, >>> On 03/03/2015 11:30 AM, Xishi Qiu wrote: >>> When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/04/2015 10:22 AM, Xishi Qiu wrote: > On 2015/3/3 18:20, Gu Zheng wrote: > >> Hi Xishi, >> On 03/03/2015 11:30 AM, Xishi Qiu wrote: >> >>> When hot-remove a numa node, we will clear pgdat, >>> but is memset 0 safe in try_offline_node()? >> >> It is not safe here. In fact, this is

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/4 10:22, Xishi Qiu wrote: > On 2015/3/3 18:20, Gu Zheng wrote: > >> Hi Xishi, >> On 03/03/2015 11:30 AM, Xishi Qiu wrote: >> >>> When hot-remove a numa node, we will clear pgdat, >>> but is memset 0 safe in try_offline_node()? >> >> It is not safe here. In fact, this is a temporary

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/3 18:20, Gu Zheng wrote: > Hi Xishi, > On 03/03/2015 11:30 AM, Xishi Qiu wrote: > >> When hot-remove a numa node, we will clear pgdat, >> but is memset 0 safe in try_offline_node()? > > It is not safe here. In fact, this is a temporary solution here. > As you know, pgdat is accessed

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: > When hot-remove a numa node, we will clear pgdat, > but is memset 0 safe in try_offline_node()? It is not safe here. In fact, this is a temporary solution here. As you know, pgdat is accessed lock-less now, so protection mechanism (RCU?) is

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/4 11:53, Gu Zheng wrote: Hi Xishi, On 03/04/2015 10:22 AM, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/04/2015 10:52 AM, Xishi Qiu wrote: On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe here. In fact, this is a temporary solution here. As you know, pgdat is accessed lock-less

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Xishi Qiu
On 2015/3/4 10:22, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe here. In fact, this is a temporary solution here. As

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/04/2015 10:22 AM, Xishi Qiu wrote: On 2015/3/3 18:20, Gu Zheng wrote: Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe here. In fact, this is a temporary

Re: node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-03 Thread Gu Zheng
Hi Xishi, On 03/03/2015 11:30 AM, Xishi Qiu wrote: When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? It is not safe here. In fact, this is a temporary solution here. As you know, pgdat is accessed lock-less now, so protection mechanism (RCU?) is

node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-02 Thread Xishi Qiu
When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? process A: offline node XX: for_each_populated_zone() find online node XX cond_resched() offline cpu and memory, then try_offline_node()

node-hotplug: is memset 0 safe in try_offline_node()?

2015-03-02 Thread Xishi Qiu
When hot-remove a numa node, we will clear pgdat, but is memset 0 safe in try_offline_node()? process A: offline node XX: for_each_populated_zone() find online node XX cond_resched() offline cpu and memory, then try_offline_node()