Thread (8 messages) 8 messages, 4 authors, 2014-01-21

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

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2014-01-21 20:26:29

2014/1/21 Steven J. Hill [off-list ref]:
On 01/21/2014 12:25 PM, David Daney wrote:
quoted
On 01/21/2014 08:18 AM, Steven J. Hill wrote:
quoted
From: Leonid Yegoshin <redacted>

Use the PREF instruction to optimize partial checksum operations.

Signed-off-by: Leonid Yegoshin <redacted>
Signed-off-by: Steven J. Hill <redacted>

NACK.  The proper latench and cacheline stride vary by CPU, you cannot
just hard code them for 32-byte cacheline size with some random latency.

This will make some CPUs slower.
Note that memcpy.S already uses fixed cache lines (32 bytes) so this is
merely doing the same thing. I assume you have some empirical evidence
concerning other CPUs being slower?
How about using cpu_dcache_line_size()/MIPS_L1_CACHE_SHIFT? These
should provide a good hint. Octeon has a 128bytes D$ line size, so
prefetching via slices of 32 bytes is most likely suboptimal.
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help