tech-kern archive

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

Re: Is there a way to obtain a machine's cache line size?



On Thu, Jan 20, 2011 at 02:47:11PM -0500, der Mouse wrote:
> > I see there is a compile time constant CACHE_LINE_SIZE in
> > <sys/param.h> which currently seems to be always be set to 64, but
> > I'm pretty certain that is not necessarily a correct value.
> 
> You are correct; to cite the one example I currently have swapped into
> my brain, the Super-H used in the Dreamcast has 32-byte cache lines
> (true of the I-cache and D-cache both).

m68060/68040/68030/.. I think and 68020 have all 16 bytes cache line size.

m68010 doesn't have a real cache, but the very small instruction fetch fifo 
is blocked when a djnz is executed, so that a very short loop (1 other
instruction) can be executed without repeated instruction fetches.

        -is


Home | Main Index | Thread Index | Old Index