[PATCH 3/5] perf tools: Use cpu/possible instead of cpu/kernel_max

From: Jiri Olsa
Date: Fri Apr 18 2014 - 06:33:58 EST


From: Don Zickus <dzickus@xxxxxxxxxx>

The system's max configuration is represented by cpu/possible and
cpu/kernel_max can be huge (4096 vs. 128), so save space by keeping
smaller structures.

Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1396896924-129847-3-git-send-email-dzickus@xxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
tools/perf/util/cpumap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 0a27732..3d124fb 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -365,7 +365,7 @@ static void set_max_cpu_num(void)
goto out;

/* get the highest possible cpu number for a sparse allocation */
- snprintf(path, PATH_MAX, "%s/devices/system/cpu/kernel_max", mnt);
+ snprintf(path, PATH_MAX, "%s/devices/system/cpu/possible", mnt);

ret = get_max_num(path, &max_cpu_num);

--
1.8.3.1

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