Skip to content

Commit

Permalink
perf tools: Use cpu/possible instead of cpu/kernel_max
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
dzickusrh authored and Jiri Olsa committed Apr 22, 2014
1 parent 7780c25 commit f5b1f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/cpumap.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static void set_max_cpu_num(void)
goto out;

/* get the highest possible cpu number for a sparse allocation */
ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/kernel_max", mnt);
ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/possible", mnt);
if (ret == PATH_MAX) {
pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX);
goto out;
Expand Down

0 comments on commit f5b1f4e

Please sign in to comment.