Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp490890rwb; Wed, 16 Nov 2022 03:50:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Y5h+eUYQy40PyMUt13+2dGsUgImWar0T8a+bLkHyQTvnuCSbJx2j9apeXhyIELqH5OMKd X-Received: by 2002:a17:906:164a:b0:78d:39e8:89eb with SMTP id n10-20020a170906164a00b0078d39e889ebmr17069863ejd.639.1668599404584; Wed, 16 Nov 2022 03:50:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668599404; cv=none; d=google.com; s=arc-20160816; b=biX7h4JQi+SSgjQ0c88lRVrAkWHBQZh/nnxZ5ZivVtmhy2+/pe2AWXVPrK27ep6HCJ xbnTvLBt5YGLc/dgIiOIuZ8WwoMqdH2vt3GQz8B6AeMMU/royhxHHOS0BmE6lxMTMv1l USStn2rHOofLjY28wHrE6/s0Yuwl/9uqJA8tZpOfpVZbas/dGomHa0PxvRUhHuXgFDcx kIm7bBhhdMYOzqW0Lpg37VGEkq5CPhU2SbtMrDn70uRqwQ7Un4P0GrOjuA8017XEE4Oh BOAW+r4zsM4AwCPXVfQvVeAfWIK9eoj5qWGIDKF9roYJr0/WYFmzOjlIxAcOJVihCAnp hUeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J2clWe1CPxV+vvTwVNi4paLinQa+9xorbUTFEpQr4Lw=; b=qqW9GToo3HCsdRbsqMCJztngTsbLpq9zd54wrnhC74xOAch/ykNRoucbeNa0IEWmGr SH0OLYEKP4U1tYfaLirOXXnztlSVdqdfoSLDU00hBvj3irua999tL9eyv00I8vQWQPqi qCqUYupULWbAr3ABppdGYuM+BNh8ggExTO29Hnd+3LBbQaKrYP7V+Cb0kJ8UxsYGvcQd +8Bto2PCWb8OjBpQht2o+MQua5nIHTv9kozrr31JZr5pcqbxLzrmWNY6OZjgF7v8mSaI K4xLcrT3WZ/4bJBsCk9OYo2NHJ3Jti4tQEkx3z+myFPI7uiaSM9+2QXMi2rypgLRRrJW gyQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=eypQ7wur; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du4-20020a17090772c400b007ae6aa9e875si15113813ejc.370.2022.11.16.03.49.42; Wed, 16 Nov 2022 03:50:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=eypQ7wur; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237768AbiKPKt3 (ORCPT + 91 others); Wed, 16 Nov 2022 05:49:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238280AbiKPKtG (ORCPT ); Wed, 16 Nov 2022 05:49:06 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82A96FCE4 for ; Wed, 16 Nov 2022 02:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=J2clWe1CPxV+vvTwVNi4paLinQa+9xorbUTFEpQr4Lw=; b=eypQ7wuroFLD3v6Rzkpc5K5mMR mfFN5fTJDEQ5wnZ2E6SAY/vZ++iTiRaM6HWxXRV3oam/PcUHYu0zJrpk70EoFoH7IkFr/YAQIOQaf W8BYPDgT4rYxrNu6MisK0WO4eIt9c3gI9z9b7UqE3qJYVkE5mtdSRBjb2dgGeFTHN+TuE/BShAkeu rkaZxNey1kyJ38jZybiAmTCvFN34NhwJJhba76CI2noH7kTntJIvoYu0D4dW1YGKWHzivMB0SwNTR WGdawHe82uKqVKEFnsjCfo49a8SixLddt05VuBQme/QhcBHeko4SjOLWgVr6E+Sw+ZK4jnJogZB3F ZW/tLr1Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovFn3-001H0b-Sh; Wed, 16 Nov 2022 10:37:10 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9CD9030062A; Wed, 16 Nov 2022 11:37:08 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7ED732B655978; Wed, 16 Nov 2022 11:37:08 +0100 (CET) Date: Wed, 16 Nov 2022 11:37:08 +0100 From: Peter Zijlstra To: John Stultz Cc: LKML , Pavankumar Kondeti , John Dias , Connor O'Brien , Rick Yiu , John Kacur , Qais Yousef , Chris Redpath , Abhijeet Dharmapurikar , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Thomas Gleixner , Heiko Carstens , Vasily Gorbik , Joel Fernandes , Alexander Gordeev , kernel-team@android.com, Satya Durga Srinivasu Prabhala , "J . Avila" Subject: Re: [PATCH v5 3/3] softirq: defer softirq processing to ksoftirqd if CPU is busy with RT Message-ID: References: <20221116075929.453876-1-jstultz@google.com> <20221116075929.453876-4-jstultz@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221116075929.453876-4-jstultz@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2022 at 07:59:28AM +0000, John Stultz wrote: > From: Pavankumar Kondeti > > Defer the softirq processing to ksoftirqd if a RT task is > running or queued on the current CPU. This complements the RT > task placement algorithm which tries to find a CPU that is not > currently busy with softirqs. > > Currently NET_TX, NET_RX, BLOCK and IRQ_POLL softirqs are only > deferred as they can potentially run for long time. > > Additionally, this patch stubs out ksoftirqd_running() logic, > in the CONFIG_RT_SOFTIRQ_AWARE_SCHED case, as deferring > potentially long-running softirqs will cause the logic to not > process shorter-running softirqs immediately. By stubbing it out > the potentially long running softirqs are deferred, but the > shorter running ones can still run immediately. So I'm hating on the new config space, and dubious of the placement logic (I'm thinking much the same gain can be had when actual softirq processing stops quickly when we want to reschedule). However I still have these here patches (revived from the dead): https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=core/softirq That fix some of this same... I think the last time this fell on its face due to regressions and me not having time/energy to chase them down and the author of the hack-of-the-day solution walking off or something like that. I think this aspect of the whole softirq thing really needs fixing first and not hidden under some obscure CONFIG symbol.