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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 C8451C63798 for ; Tue, 24 Nov 2020 00:06:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3200120729 for ; Tue, 24 Nov 2020 00:06:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HJTyhrP2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="j6SecNH3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727893AbgKXAGS (ORCPT ); Mon, 23 Nov 2020 19:06:18 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:39268 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgKXAGS (ORCPT ); Mon, 23 Nov 2020 19:06:18 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606176375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pHgX8+4TV9Nw2BiY/0kJVALhIqoS3Bge9Gph+T2lLis=; b=HJTyhrP2bJioLD+987Ys70sntmISGX+DLi5zSWQWyOeNYxGw+Rcgcp96xJXkNql5saR4b1 mtRJeCQMIYNOQc5bGK9o3cjSFHmd0XwO5JzY9Ed97ukjc9tLjn2NVQpjFv7Tl1UCWJyJxP 4r4pyVX89yJRly+FJ1p9pSNf87sDfHyqh8WflOfzH0e+r9XFjgJp1ILEUFI98Q3jUGqNI8 ZIdelFQeSVJ7UVhprV3dNRgYyMF3dgl3qia6vzgckrcgkrsKzdV18WnWbwxPPhOYtVJGWc cr5Duzs/vYWkaaAOPuJb9Qv9vdNI3WJRAwaCR1OTmFq2ePRtPZnRbJJzycwJsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606176375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pHgX8+4TV9Nw2BiY/0kJVALhIqoS3Bge9Gph+T2lLis=; b=j6SecNH3mtXRZPPLBTkvtl4Q11WTEjpfetY9og3uuduZGYkJQlpXdvg4Dnk0hrMtUfud6O 7Ako8/dL7EVU3NCg== To: Frederic Weisbecker 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 In-Reply-To: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> <20201123235801.GE1751@lothringen> Date: Tue, 24 Nov 2020 01:06:15 +0100 Message-ID: <87wnyblitk.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Tue, Nov 24 2020 at 00:58, Frederic Weisbecker wrote: > 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. Good point. Haven't thought about that. Let me have a look again. Thanks, tglx 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 CCB6EC2D0E4 for ; Tue, 24 Nov 2020 00:08:01 +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 5768F20731 for ; Tue, 24 Nov 2020 00:08:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nwvkguji"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HJTyhrP2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="j6SecNH3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5768F20731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de 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:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oPuqaG531vdVvo4IgoNOqdzZKfyfkTK0Wpv/O9mCZBk=; b=nwvkgujiVedHatro9lpvAt7+5 oG4ESZqWKYyqFd457HAJjrlka/7AEXIM4Xv0kotsv+ms6ndEwBa+yXsQu8e7xJquVAmTem7iNMUk5 FjjPM2sc0OvTY2BJtedUrK4/QQcA2kZSSOh7zEBoMov2biz4fNyvtBx8Vcjre9wQw2qDJh1GGbt4K /Fr+iY88wQCxM3FdcA5VZFsi6/rY2xdKA+OW4A5fh07NzrfqSBsAbx2eobwEXmGYFagpxV2IduMgb 8VhUHTnQLJeF5PLo0bx6Zg3Y10EcteaxJ4fM6ueP2Ub8ZZwyGIlNUBnqhRWy+5lHrLgPJDbJTG1Ql s3wES1SpQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khLqe-0000uL-A7; Tue, 24 Nov 2020 00:06:20 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khLqb-0000tY-Rg; Tue, 24 Nov 2020 00:06:18 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606176375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pHgX8+4TV9Nw2BiY/0kJVALhIqoS3Bge9Gph+T2lLis=; b=HJTyhrP2bJioLD+987Ys70sntmISGX+DLi5zSWQWyOeNYxGw+Rcgcp96xJXkNql5saR4b1 mtRJeCQMIYNOQc5bGK9o3cjSFHmd0XwO5JzY9Ed97ukjc9tLjn2NVQpjFv7Tl1UCWJyJxP 4r4pyVX89yJRly+FJ1p9pSNf87sDfHyqh8WflOfzH0e+r9XFjgJp1ILEUFI98Q3jUGqNI8 ZIdelFQeSVJ7UVhprV3dNRgYyMF3dgl3qia6vzgckrcgkrsKzdV18WnWbwxPPhOYtVJGWc cr5Duzs/vYWkaaAOPuJb9Qv9vdNI3WJRAwaCR1OTmFq2ePRtPZnRbJJzycwJsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606176375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pHgX8+4TV9Nw2BiY/0kJVALhIqoS3Bge9Gph+T2lLis=; b=j6SecNH3mtXRZPPLBTkvtl4Q11WTEjpfetY9og3uuduZGYkJQlpXdvg4Dnk0hrMtUfud6O 7Ako8/dL7EVU3NCg== To: Frederic Weisbecker Subject: Re: [patch 14/19] softirq: Make softirq control and processing RT aware In-Reply-To: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> <20201123235801.GE1751@lothringen> Date: Tue, 24 Nov 2020 01:06:15 +0100 Message-ID: <87wnyblitk.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_190618_020830_4516B352 X-CRM114-Status: GOOD ( 13.90 ) 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 Tue, Nov 24 2020 at 00:58, Frederic Weisbecker wrote: > 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. Good point. Haven't thought about that. Let me have a look again. Thanks, tglx _______________________________________________ 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: From: Thomas Gleixner Subject: Re: [patch 14/19] softirq: Make softirq control and processing RT aware In-Reply-To: <20201123235801.GE1751@lothringen> References: <20201113140207.499353218@linutronix.de> <20201113141734.324061522@linutronix.de> <20201123134437.GA95787@lothringen> <87r1ojnaai.fsf@nanos.tec.linutronix.de> <20201123235801.GE1751@lothringen> Date: Tue, 24 Nov 2020 01:06:15 +0100 Message-ID: <87wnyblitk.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 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: Frederic Weisbecker 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 Tue, Nov 24 2020 at 00:58, Frederic Weisbecker wrote: > 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. Good point. Haven't thought about that. Let me have a look again. Thanks, tglx _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um