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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 7C585C2D0C0 for ; Tue, 24 Dec 2019 02:30:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E059206D3 for ; Tue, 24 Dec 2019 02:30:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A+aY4oyg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="mBOamR3e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E059206D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AUHJ7M3TvgTl1svo3f/QM718y7SxdI5vJA5y6OfmrT0=; b=A+aY4oygOj+h0g hP8Nal7fiyOPfoHlu/NxJmEl4+MLitwY1mMZzHkoN04l4Wf8gWHVFT7TCFWPdjK5WE2/+XZFQHMzR +ZxDPTeDf/8Aro8A2D/haps2OhJQcWLn+qgQUp4o1w7b7vxrtZG5fm7fuetSpFy93rmbJ5k+Y7opw yZztj8cJ+gG8gg92YGS8eSrWx2K1KDiozWcB3/V98xX+e3LnYiO5EG+nQnfzkPSJ9j9ZAxedZKm+B Vk+6B6tjTgvC+aKEo5yCXpp0c5vM4m4GM4AQStlGgo7BP8BoQB9bkeifP9KqwHd2uOh8tyB/y5MxP UyZJYr7To2oCDfwo0D2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijZxN-0002Xb-Jp; Tue, 24 Dec 2019 02:29:57 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijZxK-0002Wx-0n for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2019 02:29:55 +0000 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72DB0207FF for ; Tue, 24 Dec 2019 02:29:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577154593; bh=DSQS0uHBNC9Ui3z1SA4ieLxiBxYjVLA1pvOoujpbOvo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mBOamR3e8+z/oxuQ1j6arsjUSXZzjlhMM4HvwMIBzxIH0PnwI3vD0y6J79ccnKo8X DVK+NzbOAuvhO9t9AREqK8/n+jmOBhUq+hrD4x5Lzu4meIgw/Aq56f9vXJtZCiBv6N w94bwVmE4Fl4guBclpw34hSD8o5Dpk5G3lj9oiXU= Received: by mail-wr1-f51.google.com with SMTP id c14so18615897wrn.7 for ; Mon, 23 Dec 2019 18:29:53 -0800 (PST) X-Gm-Message-State: APjAAAVSTqg4rRcZuZQIct7VpYrdB2mDwkUiUgkP+0HVO/XEBJF4NQkD E4ADDHBmkAh+7U1d8gWxfjapJwtmm/nl2SR/1zTW8A== X-Google-Smtp-Source: APXvYqz5QXY27AstGyElWlUnUHM0Y/Cls6krR6JAY/F6G6Ra4+oArxsi2W6pHlVu1RWJHAU5CqdrqYSugVUavqgLJoc= X-Received: by 2002:adf:eb09:: with SMTP id s9mr34152116wrn.61.1577154591966; Mon, 23 Dec 2019 18:29:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andy Lutomirski Date: Mon, 23 Dec 2019 18:29:39 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres() To: Christophe Leroy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191223_182954_083907_41EAC572 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Benjamin Herrenschmidt , X86 ML , LKML , "open list:MIPS" , Paul Mackerras , Andrew Lutomirski , Michael Ellerman , Thomas Gleixner , Vincenzo Frascino , linuxppc-dev , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 23, 2019 at 6:31 AM 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. 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel