/proc/cpuinfo bad cache info
Hi!
In recent 2.4.x kernels the "Cache: " line in /proc/cpuinfo reports the amount of the L1 cache or L2 cache or L3 cache or some combination of them, depending on what code is executed for this ( different for different CPU types ).
Somebody should decide what information should be reported in that line and then fix the code.
Party on !
Signature · 4 lines
David Balazic -------------- "Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Followup to: <[email protected]> By author: David Balazic <[email protected]> In newsgroup: linux.dev.kernel
Quoted 9 lines
In recent 2.4.x kernels the "Cache: " line in
/proc/cpuinforeports the amount of the L1 cache or L2 cache or L3 cache or some combination of them, depending on what code is executed for this ( different for different CPU types ).Somebody should decide what information should be reported in that line and then fix the code.
We already DO report the information we care about -- the SMP weighting value -- and thus the code is correct. The value indicates how much data is localized to that CPU and therefore how expensive it is to reschedule a process elsewhere.
Anything that reports anything else is buggy. This includes things like adding in the L1 cache in an inclusive cache design, or reporting the L3 cache when it is a shared cache in the chipset.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>
Quoted 4 lines
We already DO report the information we care about -- the SMP weighting value -- and thus the code is correct. The value indicates how much data is localized to that CPU and therefore how expensive it is to reschedule a process elsewhere.
There are plenty of other reasons for wanting to know more, eg picking which video encode tables to use - but I still agree they belong in user space since cpuid is available from user space too