Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-04-07 Thread Don Zickus
On Mon, Apr 07, 2014 at 02:28:35PM +0900, Namhyung Kim wrote: > On Sun, 6 Apr 2014 14:15:46 +0200, Jiri Olsa wrote: > > On Thu, Apr 03, 2014 at 02:48:51PM +0900, Namhyung Kim wrote: > >> More generally, this sysfs access needs to check actual mountpoint using > >> sysfs__mountpoint() IMHO. > >> >

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-04-06 Thread Namhyung Kim
On Sun, 6 Apr 2014 14:15:46 +0200, Jiri Olsa wrote: > On Thu, Apr 03, 2014 at 02:48:51PM +0900, Namhyung Kim wrote: >> More generally, this sysfs access needs to check actual mountpoint using >> sysfs__mountpoint() IMHO. >> >> Also this API can be generalized like reading int value from a sysfs >>

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-04-06 Thread Jiri Olsa
On Mon, Mar 31, 2014 at 10:39:44PM -0400, Don Zickus wrote: > On Sat, Mar 29, 2014 at 06:10:33PM +0100, Jiri Olsa wrote: > > > +/* Determine highest possible node in the system for sparse allocation */ > > > +static void set_max_node_num(void) > > > +{ > > > + FILE *fp; > > > + int ret = -1; > > >

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-04-06 Thread Jiri Olsa
On Thu, Apr 03, 2014 at 02:48:51PM +0900, Namhyung Kim wrote: > Hi Don, SNIP > > More generally, this sysfs access needs to check actual mountpoint using > sysfs__mountpoint() IMHO. > > Also this API can be generalized like reading int value from a sysfs > file as the filename itself represents

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-04-02 Thread Namhyung Kim
Hi Don, (Adding Boris to CC as he might be interested) On Mon, 24 Mar 2014 15:32:54 -0400, Don Zickus wrote: > This patch figures out the max number of cpus and nodes that are on the > system and creates a map of cpu to node. This allows us to provide a cpu > and quickly get the node associated

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-03-31 Thread Don Zickus
On Sat, Mar 29, 2014 at 06:10:33PM +0100, Jiri Olsa wrote: > > +/* Determine highest possible node in the system for sparse allocation */ > > +static void set_max_node_num(void) > > +{ > > + FILE *fp; > > + int ret = -1; > > + > > + /* set up default */ > > + max_node_num = 8; > > + > > +

Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-03-29 Thread Jiri Olsa
On Mon, Mar 24, 2014 at 03:32:54PM -0400, Don Zickus wrote: > This patch figures out the max number of cpus and nodes that are on the > system and creates a map of cpu to node. This allows us to provide a cpu > and quickly get the node associated with it. > > It was mostly copied from builtin-kme

[PATCH 1/4] perf: Allow ability to map cpus to nodes easily

2014-03-24 Thread Don Zickus
This patch figures out the max number of cpus and nodes that are on the system and creates a map of cpu to node. This allows us to provide a cpu and quickly get the node associated with it. It was mostly copied from builtin-kmem.c and tweaked slightly to use less memory (use possible cpus instead