Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp461389pxk; Fri, 11 Sep 2020 11:30:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+Nnbfqz1l40NG/FuZVkfuXNbAO1yGL4Gp2CSiRp37+QX+D7YQPnTDAvGC4pbr4VBZlibG X-Received: by 2002:a17:906:82d1:: with SMTP id a17mr3246583ejy.385.1599849007332; Fri, 11 Sep 2020 11:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599849007; cv=none; d=google.com; s=arc-20160816; b=FSszTA9s/bM3psMXNpmk46+lw2XnBs3GPFPTCEEA41sMm1+eqOhWVuLGk8tcaofGH9 mIRNkqia3REekhPN/Eq188gs3QNHQswRGpTvJdWnw/Yl4dr5HfjjXzLMYITHaFmm3hgY moJJjvKJliiN0XA4NtHcnC6R0131+UI/KTNdeyV9juXA+/oCGwzxytOFjfyJS03zKHhB d4SP/MDc3JFIuG+9pK4LC+wMvJsYJohx5XTyZlYkI5386L6bPms5O43uYhHcp4hJ7FJo mHBxF6jxMS4tM6TecJY7R5igSoqK4j/OeGem3UYGLgutqfXOPcJhSjl6vpKjTnls/+PB 9RGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9b//SbxpPqFF4Y5HV5jq/8+/ryTiwgIhxqTHNYXPSYU=; b=Qx4USK1cmzHcQC5qsFIXzxD+YAfe/1UaiT9cefbrzWjFaeI/mZ986MvLpWWJCdePDE AID92Scfsstb7Ha1nrXQ68DgdThjLl60Dd4CGecmxHpgcWadOw+CdkHi1Cl4hiyPGY1y V5zJMU/heNy+erMaEyvNYJBwja6P/Xfac7uK2So5kC115aHq1aRTV6u6BJYnuTMS6rIK UQ5k8+qsGdl+PV5tf4gloBSu7Y88oLSE7kq3Z8NXYCwiRGjEG5Ad0Kk1GphcObYTH2kR ec2XH6oQV/NKlLMeCPAHw9QHPeZLVLxX/5ejewFFYjscmXva7NefaySLdKS4FT0rNPeH C7fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=rWaYaDdi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si1635766ejc.678.2020.09.11.11.29.44; Fri, 11 Sep 2020 11:30:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=rWaYaDdi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725901AbgIKS2x (ORCPT + 99 others); Fri, 11 Sep 2020 14:28:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgIKS2r (ORCPT ); Fri, 11 Sep 2020 14:28:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 433FDC061573 for ; Fri, 11 Sep 2020 11:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=9b//SbxpPqFF4Y5HV5jq/8+/ryTiwgIhxqTHNYXPSYU=; b=rWaYaDdilNlFsYaTHRsNv3imMn fk8N1Y0Hce/LK3QdsN1moa+bCC4b+8gs1FDecF6PAxH7I4sR1YfgZto8UwmSfvXnEr71GFUd3mKT4 3BjiL39XQX8osveDxsZKK4oFvQqLDS//3Lw86cQynvL3Mit0BH1Vxe13BEQYNSUx/LutgD8pB/GP9 g3qKgyrpEFh9R6FmNcGXH7n74Omj7HqpF04pwViDYjov/gqrZnaNJDS42d2T7mZKCDP/PJKdBxLwv J/FNxdRLrj+wC1dhuNHc2ABYBQhTf3Kwh58HvCSCrbR4OPtnRubSdBtjrxsGVE4/QCwSWhDs30AsS n0yrA2Sg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGnml-0004AD-M2; Fri, 11 Sep 2020 18:28:36 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 58AE33012DC; Fri, 11 Sep 2020 20:28:32 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 42F4E2BA9CF95; Fri, 11 Sep 2020 20:28:32 +0200 (CEST) Date: Fri, 11 Sep 2020 20:28:32 +0200 From: peterz@infradead.org To: Qais Yousef Cc: qianjun.kernel@gmail.com, tglx@linutronix.de, will@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, laoar.shao@gmail.com, urezki@gmail.com, John Dias , Wei Wang , Quentin Perret Subject: Re: [PATCH V6 1/1] Softirq:avoid large sched delay from the pending softirqs Message-ID: <20200911182832.GL1362448@hirez.programming.kicks-ass.net> References: <20200909090931.8836-1-qianjun.kernel@gmail.com> <20200911164644.eqjqjucvqfvrmr67@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200911164644.eqjqjucvqfvrmr67@e107158-lin.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2020 at 05:46:45PM +0100, Qais Yousef wrote: > On 09/09/20 17:09, qianjun.kernel@gmail.com wrote: > > From: jun qian > > > > When get the pending softirqs, it need to process all the pending > > softirqs in the while loop. If the processing time of each pending > > softirq is need more than 2 msec in this loop, or one of the softirq > > will running a long time, according to the original code logic, it > > will process all the pending softirqs without wakeuping ksoftirqd, > > which will cause a relatively large scheduling delay on the > > corresponding CPU, which we do not wish to see. The patch will check > > the total time to process pending softirq, if the time exceeds 2 ms > > we need to wakeup the ksofirqd to aviod large sched delay. > > > > Signed-off-by: jun qian > > In Android there's a patch that tries to avoid schedling an RT task on a cpu > that is running softirqs. I wonder if this patch helps with this case. > > https://android.googlesource.com/kernel/msm/+/5c3f54c34acf4d9ed01530288d4a98acff815d79%5E%21/#F0 > > John, Wei, is this something of interest to you? Urgh.. that's pretty gross. I think the sane approach is indeed getting softirqs to react to need_resched() better.