Re: [patch 2/2] m68k: Discontinuous memory support

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

 



On Mon, 28 May 2007 21:16:32 +0200
Geert Uytterhoeven <[email protected]> wrote:

> +	for_each_online_pgdat(pgdat) {
> +		for (i = 0; i < pgdat->node_spanned_pages; i++) {
> +			struct page *page = pgdat->node_mem_map + i;
> +			total++;
> +			if (PageReserved(page))
> +				reserved++;
> +			else if (PageSwapCache(page))
> +				cached++;
> +			else if (!page_count(page))
> +				free++;

This isn't really true.  Callers of the page allocator don't _have_ to use
page_count(): they can internally perform their own refcounting.  One such
caller is slab, so this "free" count can end up being grossly wrong.

> +			else
> +				shared += page_count(page) - 1;
> +		}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux