Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp567111rwb; Wed, 28 Sep 2022 06:29:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cxAEgpuJ9x6K6vTIEK+rdVisXmvssq/qowfsBeLwofjMNEfraQkXBvTUc5X/gKf5ghp4F X-Received: by 2002:a05:6a00:4517:b0:557:ba71:e53b with SMTP id cw23-20020a056a00451700b00557ba71e53bmr22756772pfb.6.1664371775772; Wed, 28 Sep 2022 06:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664371775; cv=none; d=google.com; s=arc-20160816; b=XMB9SqdorKebgU2PBgnODevZrJLvr4K6DHkLK5pBBerLmbFloV3kUoYIzoakm1KKTE UHjocREiIu+E9E2dCk6jxmWP2Gv3tEik55rYLpkwgQ/+0FcBVedcX3o/+Nuwu0skeUoq CzRQlSTCV3JV3HEEUuHiKx51gohi8G84QvHnfDuOMlYQCxHTW5S6t2eaE+fxxrS+OTbH agSzUynUmdGfyaR38wl4Z5QdEwkB6e087n4gydb4sP6cqAy2ichoKPdThftXX0WrSfgU eHSYbXytjzU9jiYQiSZxKAr5R4F5mYRoXSRIevx9VMv0gGFUStkSdSoNWPdQwTMjvNxa a3fw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ieS027Dqw+MW5ws8Qa+gBEsO3hGx+dFK75PmJ97myRU=; b=OWW50/c8anyChTfEUv7qNBO/5FTGkx2Cbk8ApQgx0gEAaCMD84zU3uHgyVzuNmyDc7 BUptATeP3YpeeEfLcqYHfZ/lsb31fyF082xT5aD9cbzMMFbZ1BL7T27QdfLwvCzF24gr v4f1QKd4dXe1JseGtTH+40mMu8efCmjIWso9U6r4OQfzURIJo1PfS7zhv+1gzyrc63Fv /EHcIUiNJj7wUBfkuAxdT610RkxpO3jhfWPJbQfC55JC7piknbjKktfaD6GFLvEUuI6a G4dPndyCDnA3JkvLEfGRGCAIGRYzSZH9i1RLUiOXUr5qOB/PXTdCbHQeEWW1p02/SgFQ RY7A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bn12-20020a056a02030c00b0042b8b0284cfsi4869465pgb.509.2022.09.28.06.29.04; Wed, 28 Sep 2022 06:29:35 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234032AbiI1NBQ (ORCPT + 99 others); Wed, 28 Sep 2022 09:01:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233785AbiI1NBF (ORCPT ); Wed, 28 Sep 2022 09:01:05 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 965DF9DB4F for ; Wed, 28 Sep 2022 06:00:47 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1A191063; Wed, 28 Sep 2022 06:00:53 -0700 (PDT) Received: from wubuntu (unknown [10.57.34.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CD1C3F73D; Wed, 28 Sep 2022 06:00:44 -0700 (PDT) Date: Wed, 28 Sep 2022 14:00:43 +0100 From: Qais Yousef To: John Stultz Cc: LKML , John Dias , Connor O'Brien , Rick Yiu , John Kacur , Chris Redpath , Abhijeet Dharmapurikar , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Thomas Gleixner , Heiko Carstens , Vasily Gorbik , kernel-team@android.com Subject: Re: [RFC][PATCH v3 0/3] Softirq -rt Optimizations Message-ID: <20220928130043.d6ijyxbq43tfvqg7@wubuntu> References: <20220921012550.3288570-1-jstultz@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220921012550.3288570-1-jstultz@google.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 Hi John On 09/21/22 01:25, John Stultz wrote: > Hey all, > > This series is a set of patches that optimize scheduler decisions around > realtime tasks and softirqs. This series is a rebased and reworked set > of changes that have been shipping on Android devices for a number of > years, originally created to resolve audio glitches seen on devices > caused by softirqs for network or storage drivers. > > Long running softirqs cause issues because they aren’t currently taken > into account when a realtime task is woken up, but they will delay > realtime tasks from running if the realtime tasks are placed on a cpu > currently running a softirq. Thanks a lot for sending this series. I've raised this problem in various venues in the past, but it seems it is hard to do something better than what you propose here. Borrowing some behaviours from PREEMPT_RT (like threadedirqs) won't cut it outside PREEMPT_RT AFAIU. Peter did suggest an alternative at one point in the past to be more aggressive in limiting softirqs [1] but I never managed to find the time to verify it - especially its impact on network throughput as this seems to be the tricky trade-of (and tricky thing to verify for me at least). I'm not sure if BLOCK softirqs are as sensitive. I think the proposed approach is not intrusive and offers a good balance that is well contained and easy to improve upon on the future. It's protected with a configuration option so users that don't want it can easily disable it. [1] https://gitlab.arm.com/linux-arm/linux-qy/-/commits/core/softirq/ Thanks -- Qais Yousef