[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EEFA51D.2050707@linux.vnet.ibm.com>
Date: Mon, 19 Dec 2011 12:57:01 -0800
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: KOSAKI Motohiro <kosaki.motohiro@...il.com>
CC: Naoya Horiguchi <n-horiguchi@...jp.nec.com>, linux-mm@...ck.org,
Andi Kleen <andi@...stfloor.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Andrea Arcangeli <aarcange@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 2/3] pagemap: export KPF_THP
On 12/19/2011 12:45 PM, KOSAKI Motohiro wrote:
> (12/19/11 3:31 PM), Dave Hansen wrote:
>> Let's say you profiled a application and the data shows you're missing
>> the TLB a bunch, but you're also using THP. This might give you a shot
>> at figuring out which parts of your application are *TRULY* THP-backed
>> instead of just the areas you *think* are backed.
>>
>> I'm not sure there's another way to figure it out at the moment.
>
> A snapshot status of THP doesn't help your purpose. I think you need
> perf or similar profiling subsystem enhancement.
>
> Because of, if you've seen KPF_THP at once, It has no guarantee to keep
> hugepages until applications run. Opposite, If you only need rough
> statistics, the best way is to add some new stat to
> /sys/kernel/mm/transparent_hugepage.
But, every single one of the pagemap flags is really just a snapshot
KPF_DIRTY, KPF_LOCKED, etc... The entire interface is inherently a racy
snapshot, and there's not a whole lot you can do about it.
sys_mincore() has the exact same issues. But, that does not make them
useless, nor mean they shouldn't be in the kernel.
A tracepoint or something similar to watch for THP promotions or
demotions would be a great addition to this interface. That way, you at
least have a concept if the data you got has become stale.
--
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