Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14102059ybl; Mon, 30 Dec 2019 04:09:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwcCme5oas+1mU+KStUbiO0sf7Dd2Z3IO8IR8ptlLH4aVbmmULa8g4O4o1zLsxmgoV60UJB X-Received: by 2002:aca:4ad1:: with SMTP id x200mr4803774oia.104.1577707752770; Mon, 30 Dec 2019 04:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577707752; cv=none; d=google.com; s=arc-20160816; b=BShEbb5iISabSae0PzFcSCBB1HUAcqmCn9otLa29uB6KQyztg9g9tUGgIYNMEw6TXH Flzrjpf3mdcmPsGjh+GFr0/F1FI9YxZMBNXhhMpAu8r9K5VKikNQYXwyFPg04GokuW6C pgI9pLhlgtHYSUs12Lfy5Tr5JCHzuNClIERKOjQ8gu13LTFb1RiyimeNUrzRIHXX0UNH WinP0rIv3uWOZOwKMqu/3ktMtT7AYwSgqMy3Gyb1HqrHHUjbRVfeaiqK8x6ilAiRqU+Y L5uKEIzgfi3jBatqtmm1wN9720gJex9fSqMGxbqUb9aVoYz5caUPu5+h3w7hyeArDwnf q9Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=cmWk12NXRwAYdrBcmRZya4sJ1vvyVe3Hy5h+WIjr0yw=; b=efcYaUiG/jHxY7pLBiAxJPa2imaWPTXB6A6jPidn7tlgkFg+ni110N7mV7Y7t4C5IR ThLBJwDSNxUdgpmcxTRwywtGZehfGiTvfQTlWF4U0dd2l6qxvQ7yaQYUWv06OoiMgqQF 6g5umdtUcBndvk4zKfpqIF9dwlcO+d7dydN60Gz+GZQ8U/CxuhqFk0BH0+2kwpqmspky HqvS/WXnYKxA5XS0fRFM68o1xlD30WiOPNUw256aOz+ltg2hVpBg+PzdA+NBYL70ya+P bneTQTdOcYebk7zLg/9F7j35C/usSV1jo9dNfEJgDP8ms/t/1++s8tAfwz90WRHafTwr rT9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si3297329oii.57.2019.12.30.04.08.59; Mon, 30 Dec 2019 04:09:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfL3MID (ORCPT + 99 others); Mon, 30 Dec 2019 07:08:03 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:39487 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbfL3MIC (ORCPT ); Mon, 30 Dec 2019 07:08:02 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPSA (Nemesis) id 1M3loZ-1imB5X3ixX-000s7o; Mon, 30 Dec 2019 13:08:01 +0100 Received: by mail-qv1-f53.google.com with SMTP id f16so12280764qvi.4; Mon, 30 Dec 2019 04:08:00 -0800 (PST) X-Gm-Message-State: APjAAAVAiYT1SyrwaX0nP7JnD526OQKBqHvToyxBHP5ybX52jLH9Dhel L4MRX7x9qOVnew375bm8HFLufLyWiPYnbjH4XLk= X-Received: by 2002:a0c:bd20:: with SMTP id m32mr50936334qvg.197.1577707679673; Mon, 30 Dec 2019 04:07:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Mon, 30 Dec 2019 13:07:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres() To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Vincenzo Frascino , Andy Lutomirski , "linux-kernel@vger.kernel.org" , linuxppc-dev , Linux ARM , "open list:BROADCOM NVRAM DRIVER" , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:jDOKdGxcK76WzzT4FAh+MO1q4e3xUlQLbmdYdbLmtxxWBIHJ/HL AWqfVJIHOYCNfF/hNIR+TyMp3ebgudZbn9tYY1SkQvIDEewDaci2GB8uCfFmTn1XKnEnQmh zGS6m1w/fbUv1tLbzRxkELzHwATLt1+D+RF+PG/PvtofNcSoRKS7EWu1LXwfSUmbuDzC27o gduCYI7G+WktYInkzmHpA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xVsLO1llwLY=:3k24IvDRwIWli6yX+yQfJP rwMQO0q+ila9fFJvhyEXqGGdBDLJR6Ef+VmOEGx8RFCJS08qHU3UzR1soing+CxYmooVFDTDa Tdj7MzAbvoqAC0adVVmZCEgloHjUUgnaZJ0NT2/i6DaLQJ48ZwdS+o7jWBGOKKXzCeu/gCABt qmDcqvz8/5mflEhRLGjzLBCp3cAgQUSOpn7eCVQlBd99G4U6tUDgvs76NQWLcHxo0owv9BAwD 8S7yvT6aylYPCpwyhvFJlLBmVO8y9Nfp/mqFmyMzT/dH7q2f1wdrkrV+lOnr4y8tlJo3GwWHn +vnlT1o7tG/Hib4ob1Mc5zzdiyE3uCQUUaZVbw9WzBWffn6SbVzIp9e2YV2/tXTTb/8sJkPpF sTUX++I6h1TsgMq7yxLMNUiul5gChmNXRMyTLxi4liaVL9RWRGxZo15zafy98rkMDoaoiuqmF gC2Y6C2P4GtrQ8kBulmrkChtz+Ev8ZkiZ+dLNfSqcEPSnuO4FZknK/rswvK7hqeXXh/RoK9Jd A5QRf3oUKcQ15LVNHGEWkJaHsXMaw5cFvnbHT2QanH6k2iJBlv95B+G/Wbb5QwFxMeOLywqSf imm1Eg6IHW6gyghCueaZqdtlSiQKONxnQLxVCxIv+eF94Y/OD9I2GNeU64zAeIv8mm8fsNqwp a3JDWA+spiaxQhLkyoPQdk8fPt7QzOktzCcx7WD5fS2SWV/Pb5wVRWFNr5N4NSRJBipELsZTB tLWKsz82ONkBdzweVDx5mKdVoORA/lzHwpMNprk1w57mtAgBXbnRARNHKESb2fRilHRldYuek Kr/OPZ23K3FyC1EKbVo0aLLXvTdn1JZ/wtsLCecO/VwG4uHSold4W9vJkZcuyBmKgZ1q3CDGD K5s+xhcAYEf+XlNDuM4g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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