JFFS3 & performance

Artem B. Bityuckiy dedekind at infradead.org
Fri Jan 7 10:28:18 EST 2005


On Fri, 7 Jan 2005 jasmine at linuxgrrls.org wrote:

> 
> 
> 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();
> 
Ah, you meant the *code* should be cache-line aligned ?!?

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.




More information about the linux-mtd mailing list