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/

Reply via email to