Thread (37 messages) 37 messages, 6 authors, 2020-01-13

Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres()

From: Thomas Gleixner <hidden>
Date: 2020-01-10 21:08:03
Also in: linux-mips, linuxppc-dev, lkml

Arnd Bergmann [off-list ref] writes:
On Mon, Dec 23, 2019 at 3:31 PM Christophe Leroy
[off-list ref] wrote:
quoted
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.

Signed-off-by: Christophe Leroy <redacted>
Good idea, I can see how this ends up being an improvement
for most of the callers.

Acked-by: Arnd Bergmann <arnd@arndb.de>
  https://lore.kernel.org/r/20191112012724.250792-3-dima@arista.com (local)

On the way to be applied.

Thanks,

        tglx

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help