[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c7980d11a2141a90669b063ce8569736e4675ae.camel@kernel.crashing.org>
Date: Thu, 22 Aug 2024 19:53:42 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Christoph Hellwig <hch@....de>,
LEROY Christophe
<christophe.leroy2@...soprasteria.com>
Cc: Christian Lamparter <christian.lamparter@....uni-stuttgart.de>,
Paul
Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Stan
Johnson <userm57@...oo.com>, Finn Thain <fthain@...ux-m68k.org>
Subject: Re: [PATCH v2] powerpc: warn on emulation of dcbz instruction in
kernel mode
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.
Powered by blists - more mailing lists