All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith mannthey <kmannth@us.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: andrew <akpm@osdl.org>, discuss <discuss@x86-64.org>,
	Andi Kleen <ak@suse.de>, lkml <linux-kernel@vger.kernel.org>,
	lhms-devel <lhms-devel@lists.sourceforge.net>
Subject: Re: [Lhms-devel] [PATCH 1/10] hot-add-mem x86_64: acpi motherboard fix
Date: Mon, 07 Aug 2006 17:56:56 -0700	[thread overview]
Message-ID: <1154998617.5790.31.camel@keithlap> (raw)
In-Reply-To: <20060808093110.f7b2ae04.kamezawa.hiroyu@jp.fujitsu.com>

On Tue, 2006-08-08 at 09:31 +0900, KAMEZAWA Hiroyuki wrote:
> On Mon, 07 Aug 2006 11:39:27 -0700
> keith mannthey <kmannth@us.ibm.com> wrote:
> 
> > On Sat, 2006-08-05 at 14:51 +0900, KAMEZAWA Hiroyuki wrote:
> > > On Fri, 4 Aug 2006 07:13:51 -0600
> > > Keith Mannthey <kmannth@us.ibm.com> wrote:
> > > > I have worked to integrate the feedback I recived on the last round of patches
> > > > and welcome more ideas/advice. Thanks to everyone who has provied input on
> > > > these patches already. 
> > > > 
> > > Just from review...
> > > 
> > > If new zone , which was empty at boot, are added into the system.
> > > build_all_zonelists() has to be called. (see online_pages() in memory_hotplug.c)
> > > it looks x86_64's __add_pages() doesn't calles it.
> > 
> > With RESERVE there are not empty zones.  All zones (including add-areas)
> > are setup during boot and hot add areas reserved in the bootmem
> > allocator. 
> > 
> > Zones don't change size there is no adding to the zone just on-lining on
> > pages at are already present in the zone. 
> >   
> Hmm, curious.
> please explain. 
> ==
> int __add_pages(struct zone *z, unsigned long start_pfn, unsigned long nr_pages)
> {
>         int err = -EIO;
>         unsigned long pfn;
>         unsigned long total = 0, mem = 0;
>         for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) {
>                 if (pfn_valid(pfn)) {
>                         online_page(pfn_to_page(pfn));
>                         err = 0;
>                         mem++;
>                 }
>                 total++;
>         }
>         if (!err) {
>                 z->spanned_pages += total;
>                 z->present_pages += mem; -------------------------------(*)

It is an accounting issue.  What I meant by re-sizing is there is no
change to node_mem_map (with reserve CONFIG_FLAT_NODE_MEM_MAP is set).
When the original size for the zone is setup it views that add areas as
a "hole" in the e820 space. 

See arch/x86_64/mm/init.c size_zones. 

> ==
> It looks contents of zone is increased at (*). Do I see old code ?
> 
> ==
> static inline int populated_zone(struct zone *zone)
> {
>         return (!!zone->present_pages);
> }
> ==
> "empty zone" I said means a zone which is not populated.

I know of no x86_64 hardware the supports empty node hot-add memory.  If
it exists I would recommend using SPARSEMEM based hot-add.  On HW I am
aware of there is always some memory present in a node at boot.   
 

Thanks,
  Keith 


  reply	other threads:[~2006-08-08  0:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04 13:13 [PATCH 1/10] hot-add-mem x86_64: acpi motherboard fix Keith Mannthey
2006-08-04 13:13 ` [PATCH 2/10] hot-add-mem x86_64: fixup externs Keith Mannthey
2006-08-04 13:14 ` [PATCH 3/10] hot-add-mem x86_64: Kconfig changes Keith Mannthey
2006-08-04 13:14 ` [PATCH 4/10] hot-add-mem x86_64: Enable SPARSEMEM in srat.c Keith Mannthey
2006-08-04 15:17   ` [Lhms-devel] " Mika Penttilä
2006-08-04 19:36     ` keith mannthey
2006-08-04 17:42   ` Dave Hansen
2006-08-04 13:14 ` [PATCH 5/10] hot-add-mem x86_64: memory_add_physaddr_to_nid enable Keith Mannthey
2006-08-04 13:14 ` [PATCH 7/10] hot-add-mem x86_64: x86_64 kernel mapping fix Keith Mannthey
2006-08-04 13:14 ` [PATCH 8/10] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_SPARSE Keith Mannthey
2006-08-04 13:14 ` [PATCH 9/10] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_RESERVE Keith Mannthey
2006-08-07 17:41   ` keith mannthey
2006-08-04 13:14 ` [PATCH 10/10] hot-add-mem x86_64: valid add range check Keith Mannthey
2006-08-05  5:39 ` [PATCH 1/10] hot-add-mem x86_64: acpi motherboard fix KAMEZAWA Hiroyuki
2006-08-05  5:51 ` KAMEZAWA Hiroyuki
2006-08-07 18:39   ` keith mannthey
2006-08-08  0:31     ` [Lhms-devel] " KAMEZAWA Hiroyuki
2006-08-08  0:56       ` keith mannthey [this message]
2006-08-08  2:08         ` KAMEZAWA Hiroyuki
2006-08-08  2:15           ` keith mannthey

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=1154998617.5790.31.camel@keithlap \
    --to=kmannth@us.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.