From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F551C282DD for ; Fri, 10 Jan 2020 21:08:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10C4420838 for ; Fri, 10 Jan 2020 21:08:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727160AbgAJVIB (ORCPT ); Fri, 10 Jan 2020 16:08:01 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:59790 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbgAJVIB (ORCPT ); Fri, 10 Jan 2020 16:08:01 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iq1VU-0004ld-Ub; Fri, 10 Jan 2020 22:07:49 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 6009B105BDB; Fri, 10 Jan 2020 22:07:48 +0100 (CET) From: Thomas Gleixner To: Arnd Bergmann , Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Vincenzo Frascino , Andy Lutomirski , "linux-kernel\@vger.kernel.org" , linuxppc-dev , Linux ARM , "open list\:BROADCOM NVRAM DRIVER" , the arch/x86 maintainers Subject: Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres() In-Reply-To: References: Date: Fri, 10 Jan 2020 22:07:48 +0100 Message-ID: <87o8vbrpej.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Arnd Bergmann writes: > On Mon, Dec 23, 2019 at 3:31 PM Christophe Leroy > 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. >> >> Signed-off-by: Christophe Leroy > > Good idea, I can see how this ends up being an improvement > for most of the callers. > > Acked-by: Arnd Bergmann https://lore.kernel.org/r/20191112012724.250792-3-dima@arista.com On the way to be applied. Thanks, tglx