Hello-
Zhang, Yanmin wrote:
> I worked out 2 patches to export cpu topology and cache info by sysfs.
>
> The first patch is to export cpu topology info including below items
> (attributes) which are similar to /proc/cpuinfo.
>
> /sys/devices/system/cpu/cpuX/topology/physical_package_id(representing
> the physical package id of cpu X)
> /sys/devices/system/cpu/cpuX/topology/core_id (representing the cpu core
> id to cpu X)
> /sys/devices/system/cpu/cpuX/topology/thread_id (representing the cpu
> thread id to cpu X)
> /sys/devices/system/cpu/cpuX/topology/thread_siblings (representing the
> thread siblings to cpu X)
> /sys/devices/system/cpu/cpuX/topology/core_siblings (represeting the
> core siblings to cpu X)
I haven't looked at the patches in detail, but I have a concern about
this approach. How is it that making new architecture-specific
attributes under cpu directories in sysfs is preferable to the already
architecture-specific format of /proc/cpuinfo and other proc entries?
If we're going to create a new user interface for exposing system
topology (cores and threads etc), I would like for it to be as
architecture-neutral as possible. We already do this for numa, for
example.
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]