From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbbCPI0v (ORCPT ); Mon, 16 Mar 2015 04:26:51 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:34335 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbbCPI0t (ORCPT ); Mon, 16 Mar 2015 04:26:49 -0400 Date: Mon, 16 Mar 2015 09:26:42 +0100 From: Ingo Molnar To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Minchan Kim , Joonsoo Kim Subject: Re: [RFC/PATCHSET 0/6] perf kmem: Implement page allocation analysis (v1) Message-ID: <20150316082642.GA19478@gmail.com> References: <1426145571-3065-1-git-send-email-namhyung@kernel.org> <20150312104119.GA5978@gmail.com> <20150312145837.GA1398@danjae> <20150316021035.GQ943@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150316021035.GQ943@sejong> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Namhyung Kim wrote: > On Thu, Mar 12, 2015 at 11:58:37PM +0900, Namhyung Kim wrote: > > On Thu, Mar 12, 2015 at 11:41:19AM +0100, Ingo Molnar wrote: > > > So there's one thing that would be useful: to track pages allocated on > > > one node, but freed on another. Those kinds of allocation/free > > > patterns are especially expensive and might make sense to visualize. > > > > I think it can be done easily as slab analysis already contains the info. > > Hmm.. it seems slab events provide the node info but page events > don't. Without it, I don't know which node a page is in so cannot > determine such cross-node alloc+free patterns. Well, but we know the CPU that the allocation occured on, and can map the CPU to the node. libnuma can do the mappings, 'man numa' will show you the interfaces, I think you'll need numa_node_of_cpu(). numalib needs no initialization, and 'perf bench numa' already links to it - so I think you should be fine just doing: #include #include and using the API straight away. Thanks, Ingo