[PATCH v2] powerpc: warn on emulation of dcbz instruction in kernel mode

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Aug 22 19:53:42 AEST 2024


On Thu, 2024-08-22 at 09:14 +0200, Christoph Hellwig wrote:
> 
> I'd suggest two things:
> 
>  1) remove the warning.  The use case is perfectly valid and everything
>     using uncached memory is already slow, so people will just have to
>     deal with it.  Maybe offer a trace point instead if people care about
>     it.

Well... there's slow and extremely slow .. :-) dcbz() on uncached
memory will take an exception for every "cache line" of zeros which
will then need to be emulated. We are talking about hundreds to
thousands of cycle per cache line. 

(Do we have an optimisation to detect memset in the emulation code and
force it to return to a non-dcbz'ing version ? If not, that's doable
and would at least limit it to one exception per memset() instead of
one per cache-line). 

Cheers,
Ben.


More information about the Linuxppc-dev mailing list