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

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2006-04-14 02:36:05
Robin Holt wrote on Wednesday, April 12, 2006 8:15 PM
> This patch modifies ia64's show_mem() to walk the vmem_map page tables and
> rapidly skip forward across regions where the page tables are missing.
> This prevents the pfn_valid() check from causing numerous unnecessary
> page faults.
> 
> Without this patch on a 512 node 512 cpu system where every node has four
> memory holes, the show_mem() call takes 1 hour 18 minutes.  With this
> patch, it takes less than 3 seconds.


If you are going to respin another rev, please consider the following.
no biggy, just some cosmetic stuff.

> +				pgd = pgd_offset_k(end_address);
> +				if (pgd_none(*pgd)) {
> +					end_address += PTRS_PER_PUD *
> +						       PTRS_PER_PMD *
> +						       PTRS_PER_PTE *
> +						       PAGE_SIZE;

end_address += PGDIR_SIZE;


> +				pud = pud_offset(pgd, end_address);
> +				if (pud_none(*pud)) {
> +					end_address += PTRS_PER_PMD *
> +						       PTRS_PER_PTE *
> +						       PAGE_SIZE;

end_address += PUD_SIZE;

> +
> +				pmd = pmd_offset(pud, end_address);
> +				if (pmd_none(*pmd)) {
> +					end_address += PTRS_PER_PTE *
> +						       PAGE_SIZE;

end_address += PMD_SIZE;
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Apr 14 02:36:55 2006

This archive was generated by hypermail 2.1.8 : 2006-04-14 02:37:05 EST