[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1102031235100.453@chino.kir.corp.google.com>
Date: Thu, 3 Feb 2011 13:22:14 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Dave Hansen <dave@...ux.vnet.ibm.com>
cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Michael J Wolf <mjwolf@...ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [RFC][PATCH 1/6] count transparent hugepage splits
On Mon, 31 Jan 2011, Dave Hansen wrote:
>
> The khugepaged process collapses transparent hugepages for us. Whenever
> it collapses a page into a transparent hugepage, we increment a nice
> global counter exported in sysfs:
>
> /sys/kernel/mm/transparent_hugepage/khugepaged/pages_collapsed
>
> But, transparent hugepages also get broken down in quite a few
> places in the kernel. We do not have a good idea how how many of
> those collpased pages are "new" versus how many are just fixing up
> spots that got split a moment before.
>
> Note: "splits" and "collapses" are opposites in this context.
>
> This patch adds a new sysfs file:
>
> /sys/kernel/mm/transparent_hugepage/pages_split
>
> It is global, like "pages_collapsed", and is incremented whenever any
> transparent hugepage on the system has been broken down in to normal
> PAGE_SIZE base pages. This way, we can get an idea how well khugepaged
> is keeping up collapsing pages that have been split.
>
> I put it under /sys/kernel/mm/transparent_hugepage/ instead of the
> khugepaged/ directory since it is not strictly related to
> khugepaged; it can get incremented on pages other than those
> collapsed by khugepaged.
>
> The variable storing this is a plain integer. I needs the same
> amount of locking that 'khugepaged_pages_collapsed' has, for
> instance.
i.e. no global locking, but we've accepted the occassional off-by-one
error (even though splitting of hugepages isn't by any means lightning
fast and the overhead of atomic ops would be negligible).
> Signed-off-by: Dave Hansen <dave@...ux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes@...gle.com>
--
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