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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 3EE94C63697 for ; Mon, 23 Nov 2020 23:58:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C765520728 for ; Mon, 23 Nov 2020 23:58:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="CFRCTaZA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727993AbgKWX6G (ORCPT ); Mon, 23 Nov 2020 18:58:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:35354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727931AbgKWX6F (ORCPT ); Mon, 23 Nov 2020 18:58:05 -0500 Received: from localhost (unknown [176.167.152.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2051A20724; Mon, 23 Nov 2020 23:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606175884; bh=wlBAJHyNfRR9V9uKfIpJvzXL6dugQ5jSJ9PZbyQVK0w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CFRCTaZAgmKkRgWK4QqyETUgI+4tgN0UAq7RB9jbFcwi4RliJmfWhNnxQAcigLBCR FN+MYO/tZhuK0KF5bqdJPRF4oO31elR3z/Li3TGW9+/te1VGJES/iAEXj/tvELbdcb lf9dhGlX6/nYJJ5+rLwfRWNydnK9WXypNmscWo1g= Date: Tue, 24 Nov 2020 00:58:01 +0100 From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Paul McKenney , Sebastian Andrzej Siewior , Arnd Bergmann , "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Russell King , Marc Zyngier , Valentin Schneider , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: Re: [patch 14/19] softirq: Make softirq control and processing RT aware Message-ID: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1ojnaai.fsf@nanos.tec.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Mon, Nov 23, 2020 at 08:27:33PM +0100, Thomas Gleixner wrote: > On Mon, Nov 23 2020 at 14:44, Frederic Weisbecker wrote: > > On Fri, Nov 13, 2020 at 03:02:21PM +0100, Thomas Gleixner wrote: > >> + /* > >> + * Adjust softirq count to SOFTIRQ_OFFSET which makes > >> + * in_serving_softirq() become true. > >> + */ > >> + cnt = SOFTIRQ_OFFSET; > >> + __local_bh_enable(cnt, false); > > > > But then you enter __do_softirq() with softirq_count() == SOFTIRQ_OFFSET. > > __do_softirq() calls softirq_handle_begin() which then sets it back to > > SOFTIRQ_DISABLE_OFFSET... > > The RT variant of it added in this very same patch > > +static inline void softirq_handle_begin(void) { } > > +static inline void softirq_handle_end(void) { } Ah but then account_irq_enter_time() is called with SOFTIRQ_OFFSET (it's currently called with softirq_count == 0 at this point) and that may mess up irqtime accounting which relies on it. It could spuriously account all the time between the last (soft-)IRQ exit until now as softirq time. 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 C9287C2D0E4 for ; Mon, 23 Nov 2020 23:58:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5058920724 for ; Mon, 23 Nov 2020 23:58:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fvfiqaBa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="CFRCTaZA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5058920724 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+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zbxeh2c8CQ7R+0XxZzm+R8ZC6lCzJW6CeAhjo8XvHIU=; b=fvfiqaBaiEEZ8Af/30Oz34Y/1 ihq3VRRpBmVICcKWjiTgehLWbAmg/ZnagHPAl8tbOCUy2d/v8ykFAioNi2CfYEGtdx1LZnN3BZ6h+ KzJySIUif3Bg0WTswm50Qwnw6nrFbtSv6KobiGHS5BfdAveniODDVTzo2KxGJ5coSzXEFGkP2jdaK fUH2prShbhQvkRBRpzIXAwtca14HWLWBYPYQ+Gwsc0ZaRVLMuwPcxh8dyLj1RMTQ9u3hsCNKcTMxn K+qRxRVlg/tNutcUirfxnn/kGhX6w61vHwW1ijIMHE6zvO48HcDFBpZWHukT+PZz4m8CbL+7EAfcw IlZotwP3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khLih-0000Qu-QH; Mon, 23 Nov 2020 23:58:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khLif-0000QF-TO; Mon, 23 Nov 2020 23:58:06 +0000 Received: from localhost (unknown [176.167.152.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2051A20724; Mon, 23 Nov 2020 23:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606175884; bh=wlBAJHyNfRR9V9uKfIpJvzXL6dugQ5jSJ9PZbyQVK0w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CFRCTaZAgmKkRgWK4QqyETUgI+4tgN0UAq7RB9jbFcwi4RliJmfWhNnxQAcigLBCR FN+MYO/tZhuK0KF5bqdJPRF4oO31elR3z/Li3TGW9+/te1VGJES/iAEXj/tvELbdcb lf9dhGlX6/nYJJ5+rLwfRWNydnK9WXypNmscWo1g= Date: Tue, 24 Nov 2020 00:58:01 +0100 From: Frederic Weisbecker To: Thomas Gleixner Subject: Re: [patch 14/19] softirq: Make softirq control and processing RT aware Message-ID: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87r1ojnaai.fsf@nanos.tec.linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_185806_069305_A2B61136 X-CRM114-Status: GOOD ( 17.22 ) 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: Rich Felker , Catalin Marinas , Paul McKenney , Arnd Bergmann , linux-sh@vger.kernel.org, Peter Zijlstra , Richard Weinberger , Sebastian Andrzej Siewior , Valentin Schneider , Jeff Dike , LKML , Yoshinori Sato , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Marc Zyngier , Russell King , linux-um@lists.infradead.org, Will Deacon , Helge Deller , linux-arm-kernel@lists.infradead.org, Anton Ivanov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 23, 2020 at 08:27:33PM +0100, Thomas Gleixner wrote: > On Mon, Nov 23 2020 at 14:44, Frederic Weisbecker wrote: > > On Fri, Nov 13, 2020 at 03:02:21PM +0100, Thomas Gleixner wrote: > >> + /* > >> + * Adjust softirq count to SOFTIRQ_OFFSET which makes > >> + * in_serving_softirq() become true. > >> + */ > >> + cnt = SOFTIRQ_OFFSET; > >> + __local_bh_enable(cnt, false); > > > > But then you enter __do_softirq() with softirq_count() == SOFTIRQ_OFFSET. > > __do_softirq() calls softirq_handle_begin() which then sets it back to > > SOFTIRQ_DISABLE_OFFSET... > > The RT variant of it added in this very same patch > > +static inline void softirq_handle_begin(void) { } > > +static inline void softirq_handle_end(void) { } Ah but then account_irq_enter_time() is called with SOFTIRQ_OFFSET (it's currently called with softirq_count == 0 at this point) and that may mess up irqtime accounting which relies on it. It could spuriously account all the time between the last (soft-)IRQ exit until now as softirq time. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 24 Nov 2020 00:58:01 +0100 From: Frederic Weisbecker Subject: Re: [patch 14/19] softirq: Make softirq control and processing RT aware Message-ID: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87r1ojnaai.fsf@nanos.tec.linutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Thomas Gleixner Cc: Rich Felker , Catalin Marinas , Paul McKenney , Arnd Bergmann , linux-sh@vger.kernel.org, Peter Zijlstra , Richard Weinberger , Sebastian Andrzej Siewior , Valentin Schneider , Jeff Dike , LKML , Yoshinori Sato , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Marc Zyngier , Russell King , linux-um@lists.infradead.org, Will Deacon , Helge Deller , linux-arm-kernel@lists.infradead.org, Anton Ivanov On Mon, Nov 23, 2020 at 08:27:33PM +0100, Thomas Gleixner wrote: > On Mon, Nov 23 2020 at 14:44, Frederic Weisbecker wrote: > > On Fri, Nov 13, 2020 at 03:02:21PM +0100, Thomas Gleixner wrote: > >> + /* > >> + * Adjust softirq count to SOFTIRQ_OFFSET which makes > >> + * in_serving_softirq() become true. > >> + */ > >> + cnt = SOFTIRQ_OFFSET; > >> + __local_bh_enable(cnt, false); > > > > But then you enter __do_softirq() with softirq_count() == SOFTIRQ_OFFSET. > > __do_softirq() calls softirq_handle_begin() which then sets it back to > > SOFTIRQ_DISABLE_OFFSET... > > The RT variant of it added in this very same patch > > +static inline void softirq_handle_begin(void) { } > > +static inline void softirq_handle_end(void) { } Ah but then account_irq_enter_time() is called with SOFTIRQ_OFFSET (it's currently called with softirq_count == 0 at this point) and that may mess up irqtime accounting which relies on it. It could spuriously account all the time between the last (soft-)IRQ exit until now as softirq time. _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um