Re: Make show_mem() skip holes in a pgdat.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Holt <holt@xxxxxxx> 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@xxxxxxx
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."
-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux