From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758054AbbCDCxL (ORCPT ); Tue, 3 Mar 2015 21:53:11 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:39889 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756036AbbCDCxK (ORCPT ); Tue, 3 Mar 2015 21:53:10 -0500 Message-ID: <54F67376.8050001@huawei.com> Date: Wed, 4 Mar 2015 10:52:38 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Gu Zheng CC: Yasuaki Ishimatsu , Andrew Morton , Tang Chen , Yinghai Lu , Linux MM , LKML , Toshi Kani , Mel Gorman , Tejun Heo , Xiexiuqi , Hanjun Guo , Li Zefan Subject: Re: node-hotplug: is memset 0 safe in try_offline_node()? References: <54F52ACF.4030103@huawei.com> <54F58AE3.50101@cn.fujitsu.com> <54F66C52.4070600@huawei.com> In-Reply-To: <54F66C52.4070600@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.54F67388.0025,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 855b6d3c02475b5bac27360141d803c2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 you know, pgdat is accessed lock-less now, so protection >> mechanism (RCU?) is needed to make it completely safe here, >> but it seems a bit over-kill. >> Hi Gu, Can we just remove "memset(pgdat, 0, sizeof(*pgdat));" ? I find this will be fine in the stress test except the warning when hot-add memory. Thanks, Xishi Qiu