mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Dave Hansen <haveblue@us.ibm.com>,
	Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: [Patch]Tiny bug fix of memory hotadd (pgdat->node_present_pages are not correct).
Date: Thu, 09 Mar 2006 19:20:33 +0900	[thread overview]
Message-ID: <20060309191244.E607.Y-GOTO@jp.fujitsu.com> (raw)

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 <y-goto@jp.fujitsu.com>

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 



                 reply	other threads:[~2006-03-09 10:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060309191244.E607.Y-GOTO@jp.fujitsu.com \
    --to=y-goto@jp.fujitsu.com \
    --cc=akpm@osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®