Re: [PATCH] MIPS: lib: Optimize partial checksum ops using prefetching.

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

 



On Tue, Jan 21, 2014 at 10:18:42AM -0600, Steven J. Hill wrote:

> From: Leonid Yegoshin <Leonid.Yegoshin@xxxxxxxxxx>
> 
> Use the PREF instruction to optimize partial checksum operations.

Prefetch operations may cause obscure bus error exceptions on some systems
such as Malta, for example, when prefetching beyond the end of memory.
It may also mean memory regions that are just undergoing a DMA transfer
are being brought back into cache.

This pretty much means that pref is only safe to use on cache-coherent
systems.

Those are the very same reasons that are making pref headache for memcpy.

Performance tuning is another can of worms.  On those platforms that I've
benchmarked code with and without pref on, it was very hard to predict
if pref was actually an advantage.  If data that is not going to be
used is prefetch, pref wastes an issue slot, wastes instruction bandwith
and in the end makes things slower.  If data is not prefetched early
enough, same kind of issue.  And in the end PREF and MT were invented
to solve the same kind of fundamental problem: memory is slow and slower
on embedded.  For both solutions the results are extremly dependent on
workload.

Cheers,

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux