[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220908224005.GN25951@gate.crashing.org>
Date: Thu, 8 Sep 2022 17:40:05 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Mathieu Malaterre <malat@...ian.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Paul Mackerras <paulus@...ba.org>, llvm@...ts.linux.dev,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Joel Stanley <joel@....id.au>
Subject: Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang
Hi!
On Thu, Sep 08, 2022 at 05:07:24PM +0200, Arnd Bergmann wrote:
> - if the XOR code has its frame size explode like this, it's
> probably an indication of the compiler doing something wrong,
> not the kernel code.
On the contrary, it is most likely an indication that the kernel code
wants something unreasonable. Like, having 20 variables live at the
same time, but still wanting nicely scheduled machine code generated.
But I suspect GCC unrolled the loops here, even? Best way to prevent
that here is to put an option in the Makefile, for these files. We
don't want any of this unrolled after all? Or, alternatively, remove
all the manual unrolling from this code, let GCC do its thing, without
painting it in a corner.
> The result is likely that the "optimized"
> XOR implementation is slower than the default version as a
> result, and the kernel will pick the other one at boot time.
Yes. So it's self-healing even, of a sort :-)
Segher
Powered by blists - more mailing lists