Re: [discuss] [PATCH] Export cpu topology for IA32 and x86_64 by sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Not really. The current display in /proc/cpuinfo, though useful for
> human reader,
> is not very friendly to scripts. And if one wants to find out which
> logical CPUs belong
> to the same core, there will have to be some amount of code in userlevel
> to parse
> the /proc/cpuinfo and get this info. So, we thought that it may be
> useful to 
> export the masks to the user directly in a genric way. And, while doing
> that
> thinking was adding new fields in /sysfs rather than /proc/ was better.

Hmm - having written both /proc and /sys parsers i'm not sure your new
setup will be any easier to handle in a program than /proc/cpuinfo. Probably not.

I would suggest you supply a standard C library and command line utility
at least - but at least for the later the output would
be likely not that different from cat /proc/cpuinfo

> Having said that, I feel Nathan's suggestion of doing it in more
> architecturally-neutral way should be better than this. We will have a
> relook at this one now.

That makes sense. /proc/cpuinfo is not that bad in itself, except that
it's very architecture dependent.

-Andi

-
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]
  Powered by Linux