Re: [2/7] Xen VMM patch set : return code for arch_free_page
From: Andrea Arcangeli
Date: Mon Nov 29 2004 - 21:33:47 EST
On Fri, Nov 19, 2004 at 11:20:54PM +0000, Ian Pratt wrote:
>
> This patch adds a return value to the existing arch_free_page function
> that indicates whether the normal free routine still has work to
> do. The only architecture that currently uses arch_free_page is arch
> 'um'. arch xen needs this for 'foreign pages' - pages that don't
> belong to the page allocator but are instead managed by custom
> allocators. Such pages are marked using PG_arch_1.
This sure looks good too.
> @@ -508,7 +509,8 @@ static void fastcall free_hot_cold_page(
> struct per_cpu_pages *pcp;
> unsigned long flags;
>
> - arch_free_page(page, 0);
> + if (arch_free_page(page, 0))
> + return;
If you want you can microoptimize the guest placing zone =
page_zone(page) after arch_free_page. Just a side note (it cannot be
measurable anyways).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/