[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070529174435.80a13c24.akpm@linux-foundation.org>
Date: Tue, 29 May 2007 17:44:35 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-m68k@...r.kernel.org,
Roman Zippel <zippel@...ux-m68k.org>
Subject: Re: [patch 2/2] m68k: Discontinuous memory support
On Mon, 28 May 2007 21:16:32 +0200
Geert Uytterhoeven <geert@...ux-m68k.org> 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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists