All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-ia64@vger.kernel.org
Subject: Re: show_mem() for ia64 discontig takes a really long time on
Date: Tue, 28 Mar 2006 19:16:19 +0000	[thread overview]
Message-ID: <1143573379.9731.37.camel@localhost.localdomain> (raw)
In-Reply-To: <20060328184315.GA8162@lnx-holt.americas.sgi.com>

On Tue, 2006-03-28 at 12:43 -0600, Robin Holt wrote:
> The system was a fully populated 512 node SGI machine.  The way that
> memory is physically layed out results in a single pgdat which covers
> the node with two holes in it.  This is new hardware with larger gaps
> between the chunks of memory that earlier version had.  As show_mem()
> is traversing the entire systems memory to print out stats on remaining
> memory, it takes faults while trying to look at holes in the array of
> struct pages.

Could you explain a bit how this works on ia64?  I know about the
vmem_map.  Is the time spent on filling TLB entries when you hit a
'struct page' that isn't backed by real memory?

> At this point, I am looking for any sort of direction on what would be
> a reasonable fix.  Should show_mem() be made to skip to a page aligned
> point in the array when the fault fails?

Yeah, this would be my first instinct.  Perhaps a function like:

unsigned long hole_nr_pages(unsigned long pfn)
{
}

For sparsemem, it could just return PAGES_PER_SECTION.  For
architectures like ia64, it could either return the minimum hole size,
or be smarter and go look in some arch-specific information to find the
real hole size.  

Maybe something like this in your show_mem():

        for_each_pgdat(pgdat) {
		...
                for(i = 0; i < pgdat->node_spanned_pages; i++) {
                        struct page *page;
                        if (pfn_valid(pgdat->node_start_pfn + i))
                                page = pfn_to_page(pgdat->node_start_pfn + i);
                        else
-				continue;
+				/* -1 to offset i++ */
+                              	pfn += hole_nr_pages(pfn) - 1;

> Should we add the information
> about start and end of hole to the pgdat()?

No.  No.  Please, no. :)

Sparsemem is pretty good at this already.  Also, the whole idea of
DISCONTIGMEM was to have a pgdat that describes a contiguous area.
We've massacred that concept with NUMA stuff since then, but that _was_
the original idea.  

> Should we have one pgdat per chunk?

That's one concept that probably won't work today.  I went and tried to
untangle DISCONTIG node ids from NUMA node ids one day and failed
miserably.  They're too intertwined.

> Are there other better ideas out there?  Any direction would
> be greatly appreciated.

Get rid of the silly vmem_map[] :)

-- Dave


  reply	other threads:[~2006-03-28 19:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 18:43 show_mem() for ia64 discontig takes a really long time on large systems Robin Holt
2006-03-28 19:16 ` Dave Hansen [this message]
2006-03-28 19:23 ` Bob Picco
2006-03-28 19:34 ` show_mem() for ia64 discontig takes a really long time on Dave Hansen
2006-03-28 20:09 ` show_mem() for ia64 discontig takes a really long time on large systems Chen, Kenneth W
2006-03-28 20:56 ` Robin Holt
2006-03-28 21:00 ` Robin Holt
2006-03-29  0:18 ` show_mem() for ia64 discontig takes a really long time on large KAMEZAWA Hiroyuki
2006-03-30 17:29 ` show_mem() for ia64 discontig takes a really long time on large systems Jack Steiner
2006-03-30 17:48 ` Chen, Kenneth W
2006-03-30 18:18 ` Luck, Tony
2006-03-30 18:26 ` show_mem() for ia64 discontig takes a really long time on Dave Hansen
2006-03-30 18:28 ` show_mem() for ia64 discontig takes a really long time on large systems Luck, Tony
2006-03-30 18:34 ` show_mem() for ia64 discontig takes a really long time on Dave Hansen
2006-03-30 19:24 ` show_mem() for ia64 discontig takes a really long time on large systems Chen, Kenneth W
2006-04-12  7:18 ` Robin Holt
2006-04-12 17:22 ` Chen, Kenneth W
2006-04-12 17:36 ` Bob Picco
2006-04-13  3:02 ` Robin Holt
2006-04-13 16:02 ` Robin Holt
2006-04-13 16:15 ` Bob Picco

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=1143573379.9731.37.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=linux-ia64@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.