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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 51369C433B4 for ; Mon, 17 May 2021 13:58:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CC5B611BF for ; Mon, 17 May 2021 13:58:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237544AbhEQN7u (ORCPT ); Mon, 17 May 2021 09:59:50 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:58467 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232924AbhEQN7s (ORCPT ); Mon, 17 May 2021 09:59:48 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4FkLMB5gl4z9sYQ; Mon, 17 May 2021 15:58:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kki3eKxYEEqF; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4FkLMB4h80z9sYK; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7D71A8B7A1; Mon, 17 May 2021 15:58:30 +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 ZgcPxZlbLKOZ; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from [172.25.230.103] (po15451.idsi0.si.c-s.fr [172.25.230.103]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2E5D78B79C; Mon, 17 May 2021 15:58:30 +0200 (CEST) Subject: Re: [PATCH 1/2] powerpc/interrupt: Refactor interrupt_exit_user_prepare() and syscall_exit_prepare() To: Nicholas Piggin , Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <1621237386.33q9uyrpc3.astroid@bobo.none> From: Christophe Leroy Message-ID: <96329062-9e00-28a7-749e-b57a34beb56c@csgroup.eu> Date: Mon, 17 May 2021 15:57:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1621237386.33q9uyrpc3.astroid@bobo.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 17/05/2021 à 09:44, Nicholas Piggin a écrit : > Excerpts from Christophe Leroy's message of May 14, 2021 6:28 pm: >> Last part of interrupt_exit_user_prepare() and syscall_exit_prepare() >> are identical. >> >> Create a __interrupt_exit_user_prepare() function that is called by >> both. >> >> Note that it replaces a local_irq_save(flags) by local_irq_disable(). >> This is similar because the flags are never used. On ppc 8xx it is >> more efficient because it doesn't require reading MSR. > > Can these cleanups go after my interrupt performance improvements? > I posted them for last series but were dropped due to crashes without > time to resubmit. I'm working on them again now. > Euh ... ok why not, but at the time being interrupt_exit_user_prepare() and syscall_exit_prepare() are very similar. Which makes sense because both of them are returning from kernel to user so they are to do the same preparation. If you are doing the same changes to both of them, maybe it is worst including this refactor at the begining of your series. Or are you making them diverge with that series ? Christophe 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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 860A9C433ED for ; Mon, 17 May 2021 13:58:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 1332E611BF for ; Mon, 17 May 2021 13:58:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1332E611BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FkLMj5mFcz2yyM for ; Mon, 17 May 2021 23:58:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=93.17.235.10; helo=pegase2.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=) Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FkLMG5f7Sz2xv0 for ; Mon, 17 May 2021 23:58:33 +1000 (AEST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4FkLMB5gl4z9sYQ; Mon, 17 May 2021 15:58:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kki3eKxYEEqF; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4FkLMB4h80z9sYK; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7D71A8B7A1; Mon, 17 May 2021 15:58:30 +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 ZgcPxZlbLKOZ; Mon, 17 May 2021 15:58:30 +0200 (CEST) Received: from [172.25.230.103] (po15451.idsi0.si.c-s.fr [172.25.230.103]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2E5D78B79C; Mon, 17 May 2021 15:58:30 +0200 (CEST) Subject: Re: [PATCH 1/2] powerpc/interrupt: Refactor interrupt_exit_user_prepare() and syscall_exit_prepare() To: Nicholas Piggin , Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras References: <1621237386.33q9uyrpc3.astroid@bobo.none> From: Christophe Leroy Message-ID: <96329062-9e00-28a7-749e-b57a34beb56c@csgroup.eu> Date: Mon, 17 May 2021 15:57:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1621237386.33q9uyrpc3.astroid@bobo.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Le 17/05/2021 à 09:44, Nicholas Piggin a écrit : > Excerpts from Christophe Leroy's message of May 14, 2021 6:28 pm: >> Last part of interrupt_exit_user_prepare() and syscall_exit_prepare() >> are identical. >> >> Create a __interrupt_exit_user_prepare() function that is called by >> both. >> >> Note that it replaces a local_irq_save(flags) by local_irq_disable(). >> This is similar because the flags are never used. On ppc 8xx it is >> more efficient because it doesn't require reading MSR. > > Can these cleanups go after my interrupt performance improvements? > I posted them for last series but were dropped due to crashes without > time to resubmit. I'm working on them again now. > Euh ... ok why not, but at the time being interrupt_exit_user_prepare() and syscall_exit_prepare() are very similar. Which makes sense because both of them are returning from kernel to user so they are to do the same preparation. If you are doing the same changes to both of them, maybe it is worst including this refactor at the begining of your series. Or are you making them diverge with that series ? Christophe