From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,f9dc4c274aad13e4 X-Google-Attributes: gid111c93,public From: torvalds@transmeta.com (Linus Torvalds) Subject: Re: Why is our Alpha box so slow? Date: 1998/08/04 Message-ID: <6q6e4j$8c3$1@palladium.transmeta.com>#1/1 X-Deja-AN: 377754636 References: <6pv2mq$17v$1@mips.rhein-neckar.de> <6q55em$a58$1@mips.rhein-neckar.de> Organization: Transmeta Corporation, Santa Clara, CA Newsgroups: comp.os.linux.alpha In article <6q55em$a58$1@mips.rhein-neckar.de>, Christian Weisgerber wrote: > >The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is >bizarre: > > 1k: 149679693 * > 2k: 149316456 * 8k 1st level cache > 4k: 144773425 * > 8k: 144881972 * > 16k: 104659487 . > 32k: 104677115 . > 64k: 104652525 . > 128k: 104110833 . huh!? we have 1M > 256k: 56204479 of 2nd level cache > 512k: 40814057 >1024k: 32698979 >2048k: 26571787 continuously getting slower!? >4096k: 24232887 You may have 1MB of L2 cache, but it's direct-mapped and physical, and Linux (for good reasons) doesn't try to colour it. So depending on how your physical pages get spread out in memory you can't cache it all. Anyway, it's not continuously getting slower, but the effect of the cache is gradually getting less (you'd probably see it stagnating at somewhere around 24000000 which would be your main memory index). The colouring doesn't show up for the L1, because while the L1 is direct-mapped too, so is your memory (8kB pages), so there are no virtual->physical translation issues for the low 13 bits of the address, and you don't see the same effect. Now you know why newer CPU's tend to have multi-way associative caches. Much better degradation. Linus