Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3576231ybb; Mon, 6 Apr 2020 11:19:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJzuBC6ndxqIbpr0gwsiqhHrn52LlCiUryb44OdTJE4FmqlQrRZhGPgjg+/18h7dB0Mxs/g X-Received: by 2002:a05:6830:1e93:: with SMTP id n19mr19622233otr.153.1586197166649; Mon, 06 Apr 2020 11:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586197166; cv=none; d=google.com; s=arc-20160816; b=iw3uK8J+Fm11hdTEcP5gn5a9uk2zWaUJZDo1P6vrgdlrusJvomC0uiV8bItUS8RQX2 MhnwZf2ifNUgDtPKPOx7j9xT7p5cfNCz/k5uRnQSfnCyyq3Et+zR94yqVttUqIGGcvOw 4SbKM8cHfXdSQ/LxABb7X2zid1e/r+dsK9g0BlqQpXkspT8z1cB/i6m04uWrIeY2K49K qm93/WHnZRoYYK32uYBN09KRddcb4epJs4tXyXsZqOxjEzmKPLmpvT93II3kPEjlnNB4 N+SwpO2Lvg84Wzj2AhziIKGLEG4IGo4KXdFvT87+cHdYIjS1cp6B86LhuebBmfBHYQix 8jMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eo4TdLmuuA8DaXdbgpPkyf6SowdS8w6IgKKi5skgu/8=; b=tOoN5x8c37dp5cqzLD+u/JRC3iEpDeOZR862zJKQUn5QE2nksGKNIbc5fVgymW12Kp FZ6i4A4oL5TXeVFq6U/U25UbkYixSmpnNvMRGhi16Kbb2VKqp0X55Vh1QFwadcwlAe4q jUpmKArfhlS0NqzrtJ+cUIZjjryyQLog9p0z7wm4nR0bO1zoY8ni80Hmwa6MergERGDK F2H+pGtv9TrAyh1vith+LzcXFhwqKozAcIkXkfq1YEJ6KXh2HqSa3BsRytrGJGvPyWg/ le0Blby1G3ucPTUg7RrAO59SlLk/ViKGR6cmqUQZlltYYM2IWmI2cRPbLTEbjwq8ttWw 4cmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="Tnve/r/w"; 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 q2si389833oij.194.2020.04.06.11.19.05; Mon, 06 Apr 2020 11:19:26 -0700 (PDT) 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; dkim=pass header.i=@c-s.fr header.s=mail header.b="Tnve/r/w"; 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 S1726575AbgDFSSg (ORCPT + 99 others); Mon, 6 Apr 2020 14:18:36 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:55938 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbgDFSSg (ORCPT ); Mon, 6 Apr 2020 14:18:36 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48wzLg3hsJz9v0BM; Mon, 6 Apr 2020 20:18:35 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Tnve/r/w; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id sh5LVu4Zz_PJ; Mon, 6 Apr 2020 20:18:35 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48wzLg2H6kz9v0BL; Mon, 6 Apr 2020 20:18:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1586197115; bh=eo4TdLmuuA8DaXdbgpPkyf6SowdS8w6IgKKi5skgu/8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Tnve/r/wvjFnyXjUemjEM6sCiOY/gChrZ2rnjZnpLKOkXZMHxrUsLj7rBMpK/mZXt IN3fDuau70xMtUcXiYqaXpz5BbemKDAfRbLkkIHXZCqEg/mzhtZcIV0XX6MGMlM50D EQv4SBw7ESa1RtDn30ilTKkMjnIGRWwD12AoZBMo= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 415DA8B784; Mon, 6 Apr 2020 20:18:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id fDH1qkHOVEY2; Mon, 6 Apr 2020 20:18:35 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BF4838B775; Mon, 6 Apr 2020 20:18:34 +0200 (CEST) Subject: Re: [RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call To: Nicholas Piggin , Benjamin Herrenschmidt , Michael Ellerman , msuchanek@suse.de, Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <029e1064b1ad738785718221ea468c9cfc282457.1586108649.git.christophe.leroy@c-s.fr> <4ef6d617cfd34e09e9bf5a456b2e0b6d2a8a3c96.1586108649.git.christophe.leroy@c-s.fr> <1586135554.pnqaj0giue.astroid@bobo.none> From: Christophe Leroy Message-ID: <48d3e2e5-318f-011e-a59b-ec89bd7b76d2@c-s.fr> Date: Mon, 6 Apr 2020 20:18:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <1586135554.pnqaj0giue.astroid@bobo.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 06/04/2020 à 03:25, Nicholas Piggin a écrit : > Christophe Leroy's on April 6, 2020 3:44 am: >> Before : 347 cycles on null_syscall >> After : 327 cycles on null_syscall > > The problem I had doing this is that signal delivery wnats full regs, > and you don't know if you have a signal pending ahead of time if you > have interrupts enabled. > > I began to try bailing out back to asm to save nvgprs and call again. > I think that can be made to work, but it is more complication in asm, > and I soon found that 64s CPUs don't care about NVGPRs too much so it's > nice to get rid of the !fullregs state. I tried a new way in v3, please have a look. I split syscall_exit_prepare() in 3 parts and the result is unexpected: it is better than before the series (307 cycles now versus 311 cycles with full ASM syscall entry/exit). > > Possibly another approach would be to leave interrupts disabled for the > case where you have no work to do. You could create a small > syscall_exit_prepare_nowork fastpath for that case for 32-bit, perhaps? > > Thanks, > Nick > Christophe