Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbWCIKUi (ORCPT ); Thu, 9 Mar 2006 05:20:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751783AbWCIKUi (ORCPT ); Thu, 9 Mar 2006 05:20:38 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:31675 "EHLO fgwmail6.fujitsu.co.jp") by vger.kernel.org with ESMTP id S1751782AbWCIKUi (ORCPT ); Thu, 9 Mar 2006 05:20:38 -0500 Date: Thu, 09 Mar 2006 19:20:33 +0900 From: Yasunori Goto To: Andrew Morton Subject: [Patch]Tiny bug fix of memory hotadd (pgdat->node_present_pages are not correct). Cc: Dave Hansen , Linux Kernel ML X-Mailer-Plugin: BkASPil for Becky!2 Ver.2.063 Message-Id: <20060309191244.E607.Y-GOTO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.24.02 [ja] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 43 Hello. This patch is tiny bug fix for memory hotplug. When pages are onlined, not only zone->present_pages but also pgdat->node_present_pages should be refreshed. This parameter is used to show information at /sys/device/system/node/nodeX/meminfo via si_meminfo_node(). So, it shows strange value for MemUsed which is calculated (node_present_pages - all zones free pages). This patch is for 2.6.16-rc5-mm3. And I tested this on my hotplug emulation environment. Please apply. Signed-off-by: Yasunori Goto Index: pgdat7/mm/memory_hotplug.c =================================================================== --- pgdat7.orig/mm/memory_hotplug.c 2006-03-09 18:32:11.000000000 +0900 +++ pgdat7/mm/memory_hotplug.c 2006-03-09 18:34:34.000000000 +0900 @@ -130,6 +130,7 @@ int online_pages(unsigned long pfn, unsi onlined_pages++; } zone->present_pages += onlined_pages; + zone->zone_pgdat->node_present_pages += onlined_pages; setup_per_zone_pages_min(); -- Yasunori Goto - 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/