Re: JFFS3 & performance

jasmine
2005-01-07T15:25:13Z

On Fri, 7 Jan 2005, Artem B. Bityuckiy wrote:

>> i) The instruction cache suffers from this penalty and is, in fact, the
>> major issue here. Most of the wasted cycles will be waiting for an
>> instruction to arrive from the i-cache.

> I'm sorry, not exactly. Ok, could you please write the code you think is
> better? Currentlly it is:

I don't know. I guess you'd need to use inline assembler to shove the
code around. I don't know how to do that in Linux any more, but in the
OS I'm used to it would look something like this:

/* Trash the CPU data chache */
trash_cache();
ts1 = TIMESTAMP();
asm(ALIGN_32);
for (j = 0; j < memsizes[i]; j++)
mem[i][j] = mem[i][j] + 1;
asm(ALIGN_32);
for (j = 0; j < memsizes[i]; j++)
mem[i][j] = mem[i][j] + 1;
ts2 = TIMESTAMP();