Thread (17 messages) flat view 17 messages, 8 authors, 2024-08-27

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

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2024-08-22 10:24:09
Also in: lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help