public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: linux-ia64@vger.kernel.org
Subject: Re: Make show_mem() skip holes in a pgdat.
Date: Thu, 13 Apr 2006 08:05:17 +0000	[thread overview]
Message-ID: <jeek01j3ya.fsf@sykes.suse.de> (raw)
In-Reply-To: <20060413031519.GB2678@lnx-holt.americas.sgi.com>

Robin Holt <holt@sgi.com> writes:

> Index: linux-2.6/arch/ia64/mm/discontig.c
> =================================> --- linux-2.6.orig/arch/ia64/mm/discontig.c	2006-04-12 18:20:44.374700839 -0500
> +++ linux-2.6/arch/ia64/mm/discontig.c	2006-04-12 22:11:31.971106982 -0500
> @@ -547,8 +547,71 @@ void show_mem(void)
>  			struct page *page;
>  			if (pfn_valid(pgdat->node_start_pfn + i))
>  				page = pfn_to_page(pgdat->node_start_pfn + i);
> -			else
> +			else {
> +				/*
> +				 * At the beginning of a hole. Search vmem_map
> +				 * page tables for the end.
> +				 */
> +				unsigned long end_address, hole_end_pfn;
> +				unsigned long stop_address;
> +
> +				end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
> +				end_address = PAGE_ALIGN(end_address);
> +
> +				stop_address = (unsigned long) &vmem_map[
> +					pgdat->node_start_pfn + pgdat->node_spanned_pages];

When you need more than 3 levels of indentation you should factor it out
into an inline function.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2006-04-13  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13  3:15 Make show_mem() skip holes in a pgdat Robin Holt
2006-04-13  8:05 ` Andreas Schwab [this message]
2006-04-13 13:14 ` Robin Holt
2006-04-13 16:04 ` Bob Picco
2006-04-13 16:36 ` Chen, Kenneth W

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=jeek01j3ya.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox