Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1439742
| From | Borislav Petkov <bp@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id |
| Date | 2016-07-08 20:50 +0200 |
| Message-ID | <rSJ0B-5b-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <rS0mR-4Im-9@gated-at.bofh.it> <rSzDX-2k6-9@gated-at.bofh.it> <rSHrQ-7Gk-29@gated-at.bofh.it> <rSHLc-7Oc-25@gated-at.bofh.it> <rSInU-8iq-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jul 08, 2016 at 08:07:46PM +0200, Ingo Molnar wrote:
> Who can we ... thank for that nonsensical naming? :-/
>
> > E.g. on most Intel cpus you'll typically find "index0" is the L1-data cache,
> > "index1" is the L1-instruction cache, "index3" is the L2-unified cache and
> > "index4" is the L3-unified cache.
>
> Crazy. What was wrong with using 'level' or 'depth'?
It is all there:
$ grep . /sys/devices/system/cpu/cpu0/cache/index?/level
/sys/devices/system/cpu/cpu0/cache/index0/level:1
/sys/devices/system/cpu/cpu0/cache/index1/level:1
/sys/devices/system/cpu/cpu0/cache/index2/level:2
/sys/devices/system/cpu/cpu0/cache/index3/level:3
$ grep . /sys/devices/system/cpu/cpu0/cache/index?/type
/sys/devices/system/cpu/cpu0/cache/index0/type:Data
/sys/devices/system/cpu/cpu0/cache/index1/type:Instruction
/sys/devices/system/cpu/cpu0/cache/index2/type:Unified
/sys/devices/system/cpu/cpu0/cache/index3/type:Unified
for i in /sys/devices/system/cpu/cpu0/cache/index?;
do
l=$(cat $i/level)
t=$(cat $i/type)
printf "L%d-%s\n" $l $t
done
->
L1-Data
L1-Instruction
L2-Unified
L3-Unified
I believe the index naming is simply enumerating the caches...
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-06 21:10 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Ingo Molnar <mingo@kernel.org> - 2016-07-08 10:50 +0200
RE: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-08 19:10 +0200
RE: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id "Luck, Tony" <tony.luck@intel.com> - 2016-07-08 19:30 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Ingo Molnar <mingo@kernel.org> - 2016-07-08 20:10 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Borislav Petkov <bp@suse.de> - 2016-07-08 20:50 +0200
RE: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id "Luck, Tony" <tony.luck@intel.com> - 2016-07-08 20:50 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Borislav Petkov <bp@suse.de> - 2016-07-08 21:00 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Ingo Molnar <mingo@kernel.org> - 2016-07-08 21:40 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Borislav Petkov <bp@suse.de> - 2016-07-09 10:20 +0200
Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id Ingo Molnar <mingo@kernel.org> - 2016-07-08 20:10 +0200
csiph-web