Re: /proc/cpuinfo format - arch dependent!

From: Grzegorz Kulewski
Date: Tue Apr 19 2005 - 16:09:15 EST


On Tue, 19 Apr 2005, Nico Schottelius wrote:

Lee Revell [Tue, Apr 19, 2005 at 04:42:12PM -0400]:
On Tue, 2005-04-19 at 22:00 +0200, Nico Schottelius wrote:
Can you tell me which ones?


Multimedia apps like JACK and mplayer that use the TSC for high res
timing need to know the CPU speed, and /proc/cpuinfo is the fast way to
get it.

Why don't you create sysfs entries instead? It would be better to have
all the cpuinfo contents as one value per file anyway (faster
application startup).

Well, sounds very good. It's a chance for me to learn to program
sysfs and also to create something useful.

So the right location to place that data would be
/sys/devices/system/cpu/cpuX?

IIRC there was such patch not very long ago and it was rejected (to not make kernel larger or something like that...). But I can be wrong.

I think that all data from /proc that are not user-process data should be exported using sysfs or something similar. Maybe even in future one will write userspace fs (using FUSE?) to emulate old /proc entries using sysfs exported data. This will allow removing all proc code from kernel. Maybe even user processes data should be exported using sysfs (like /sys/processes/123/maps/41610000/file)? But this is my personal opinion.


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