Re: [PATCH] MIPS: lib: Optimize partial checksum ops using prefetching.
From: David Daney <hidden>
Date: 2014-01-21 21:03:48
From: David Daney <hidden>
Date: 2014-01-21 21:03:48
On 01/21/2014 12:58 PM, Steven J. Hill wrote:
On 01/21/2014 02:49 PM, Ralf Baechle wrote:quoted
On Tue, Jan 21, 2014 at 10:18:42AM -0600, Steven J. Hill wrote:quoted
From: Leonid Yegoshin <redacted> 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.So, could we have: #ifdef CONFIG_DMA_NONCOHERENT #undef CONFIG_CPU_HAS_PREFETCH #endif #define PREFSIZE (1 << MIPS_L1_CACHE_SHIFT) and then use the PREFSIZE value instead of the hardcoded value of 32?
See arch/mips/mm/page.c for code that tries to do something sensible with streaming prefetches.
Steve