提交 f5b1f4e4 编写于 作者: D Don Zickus 提交者: Jiri Olsa

perf tools: Use cpu/possible instead of cpu/kernel_max

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: NDon Zickus <dzickus@redhat.com>
Reviewed-by: NNamhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1396896924-129847-3-git-send-email-dzickus@redhat.comSigned-off-by: NJiri Olsa <jolsa@redhat.com>
上级 7780c25b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册