[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWyek-xatdsUFbFvHzT+bps_bjtQoVq8MAFsS1rcZCtEA@mail.gmail.com>
Date: Mon, 23 Dec 2019 18:29:39 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Andrew Lutomirski <luto@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"open list:MIPS" <linux-mips@...r.kernel.org>,
X86 ML <x86@...nel.org>
Subject: Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres()
On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy
<christophe.leroy@....fr> wrote:
>
> do_hres() is called from several places, so GCC doesn't inline
> it at first.
>
> do_hres() takes a struct __kernel_timespec * parameter for
> passing the result. In the 32 bits case, this parameter corresponds
> to a local var in the caller. In order to provide a pointer
> to this structure, the caller has to put it in its stack and
> do_hres() has to write the result in the stack. This is suboptimal,
> especially on RISC processor like powerpc.
>
> By making GCC inline the function, the struct __kernel_timespec
> remains a local var using registers, avoiding the need to write and
> read stack.
>
> The improvement is significant on powerpc.
I'm okay with it, mainly because I don't expect many workloads to have
more than one copy of the code hot at the same time.
Powered by blists - more mailing lists