Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932913Ab2JESjt (ORCPT ); Fri, 5 Oct 2012 14:39:49 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:58890 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932886Ab2JESjn (ORCPT ); Fri, 5 Oct 2012 14:39:43 -0400 MIME-Version: 1.0 In-Reply-To: <506E313B.5010303@jp.fujitsu.com> References: <1348724705-23779-1-git-send-email-wency@cn.fujitsu.com> <1348724705-23779-3-git-send-email-wency@cn.fujitsu.com> <5064EA5A.3080905@jp.fujitsu.com> <5064FDCA.1020504@jp.fujitsu.com> <5065740A.2000502@jp.fujitsu.com> <50693E30.3010006@jp.fujitsu.com> <506E313B.5010303@jp.fujitsu.com> From: KOSAKI Motohiro Date: Fri, 5 Oct 2012 14:39:22 -0400 X-Google-Sender-Auth: 3CEqqzw98Uh6LHuFp4hofh2pycw Message-ID: Subject: Re: [PATCH 2/4] memory-hotplug: add node_device_release To: Yasuaki Ishimatsu Cc: wency@cn.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, minchan.kim@gmail.com, akpm@linux-foundation.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 24 > I have the reason to have to fill the node struct with 0 by memset. > The node is a part of node struct array (node_devices[]). > If we add empty release function for suppressing warning, > some data remains in the node struct after hot removing memory. > So if we re-hot adds the memory, the node struct is reused by > register_onde_node(). But the node struct has some data, because > it was not initialized with 0. As a result, more waning is shown > by the remained data at hot addinig memory as follows: Even though you call memset(0) at offline. It doesn't guarantee the memory keep 0 until online. E.g. physical memory exchange during offline, bit corruption by cosmic ray, etc. So, you should fill zero at online phase explicitly if need. The basic hotplug design is: you should forget everything at offline and you shouldn't assume any initialized data at online. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/