Re: [patch 5/7] mm: page_cgroup: check page_cgroup arrays inlookup_page_cgroup() only when necessary

From: KAMEZAWA Hiroyuki
Date: Tue Nov 29 2011 - 18:43:52 EST


On Tue, 29 Nov 2011 11:52:03 +0100
Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> lookup_page_cgroup() is usually used only against pages that are used
> in userspace.
>
> The exception is the CONFIG_DEBUG_VM-only memcg check from the page
> allocator: it can run on pages without page_cgroup descriptors
> allocated when the pages are fed into the page allocator for the first
> time during boot or memory hotplug.
>
> Include the array check only when CONFIG_DEBUG_VM is set and save the
> unnecessary check in production kernels.
>
> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>


--
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/