Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4692625pxu; Tue, 13 Oct 2020 05:05:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfeFZZu4uNvmdfQq3uYUHdugsmr/OAU8T/feFgMVO2wbXM/XFy70mIGSxyR4XSBFWLPKn3 X-Received: by 2002:a7b:c1d6:: with SMTP id a22mr15081963wmj.105.1602590751463; Tue, 13 Oct 2020 05:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602590751; cv=none; d=google.com; s=arc-20160816; b=tnExSGAzeY8dEuweZYsWp43aqW08BwXHSOgDxFOp4LPt4C39CTSlxYvDCZOqEQjyxb qbZqA9psfsaGtvoX4Iu1FpIqNgUX1giK3EjcOoqw91kZKgs308PgFntgR5CGYYAnuMOY SNF4hlPc1cPBttq+U/kXGbAk8YvzmEaw7UItiwBFeeRJdmAfhcjIM1xG5KnaixJEeMbY gtLi6lNZUQvOl871w8kqrA7p71HgDh4djBCoEz+m8OHyEiMz/Jjg8D9VHwIMkp2R5S8p ThX44Gsy6GMALKl/09qGcvP4Q68WR+ixQRlrq6kXCmczFW4a+dX1qbfm21dKbXvAt1on uoKA== 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=x7PBdJoOAJoMmyFBZ2g3AIxOqx/21ojuLqSsRxayZc4=; b=Rtc6gIiLR2jt3s4P1FWxTTE/KsedF6Q0ezKXYAbOf90kzsfozNfofXJUqjA1/0gyOW PLsgEscYhlCet099NcGUaG2pBWS5z8rbp1Xa9FOiFB4kn+qn8XujUTj2oViYoEwOZ0EX 50xQvNqgFK/VriirPzu5ty2P8qEyDVbMGaoLse0sAoIyNmsNJmEGd9gwRervoE+MyfL0 BBf06PWaKNk4yCnXlM2MVKUBymtCIV8W4G5qef9rd7YcQlJTJ0UeUS1dVq6nLtFHurMO t1DDoybWZ5sqsUGs7uo0RfB/5EGf///2V4PpId9zvx7ggHZfsIiao6zPdw7JgVHfo8Sy oc0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qzuLxz3q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si4461920edl.282.2020.10.13.05.05.29; Tue, 13 Oct 2020 05:05:51 -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=pass header.i=@kernel.org header.s=default header.b=qzuLxz3q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729639AbgJMKoC (ORCPT + 99 others); Tue, 13 Oct 2020 06:44:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:36576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbgJMKoB (ORCPT ); Tue, 13 Oct 2020 06:44:01 -0400 Received: from localhost (unknown [176.164.225.223]) (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 47ADB20878; Tue, 13 Oct 2020 10:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602585840; bh=psDBvJi8oWnrGcNCqLJaeTbezh9cUHTezlmtlMpt3p0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qzuLxz3qfVnVnsgKQl6TXsce16FGYp+PYBChsGQgYZ9lLGphoF6hucl8TOj//WbBS XqyP1Y1nibMRL23mH13Dt/pXruUAEkGGSPXvN2DNdMxZIccNPBMeOBkDO9bp+GQHky Toj8lCjTvZWmG0OxoNk924byettbDTFNm7dn8Ruc= Date: Tue, 13 Oct 2020 12:43:57 +0200 From: Frederic Weisbecker To: Qais Yousef Cc: jun qian , Thomas Gleixner , peterz@infradead.org, will@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, Yafang Shao , Uladzislau Rezki Subject: Re: [PATCH V7 4/4] softirq: Allow early break the softirq processing loop Message-ID: <20201013104357.GB47577@lothringen> References: <20200915115609.85106-1-qianjun.kernel@gmail.com> <20200915115609.85106-5-qianjun.kernel@gmail.com> <878scz89tl.fsf@nanos.tec.linutronix.de> <20200925004207.GE19346@lenoir> <20200929114428.GA56480@lothringen> <20201009150139.vatmppe2e3cwtoof@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009150139.vatmppe2e3cwtoof@e107158-lin.cambridge.arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 04:01:39PM +0100, Qais Yousef wrote: > On 09/29/20 13:44, Frederic Weisbecker wrote: > > > that will delay the net_rx/tx softirq to process, Peter's branch > > > maybe can slove > > > the problem > > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git core/softirq > > > > It's probably also the right time for me to resume on this patchset: > > > > https://lwn.net/Articles/779564/ > > > > In the long term this will allow us to have per vector threads that can be > > individually triggered upon high loads, and even soft interruptible by > > other vectors from irq_exit(). Also if several vectors are on high loads > > at the same time, this leaves the balance decisions to the scheduler instead > > of all these workarounds we scratch our heads on for several years now. > > > > Besides, I'm convinced that splitting the softirqs is something we want in > > the long run anyway. > > So if I understood correctly we'll end up with a kthread for each softirq type > that can be scheduled individually on any CPU following the 'normal' scheduler > rules, correct? > > If I got it right, I like that. I certainly think having these softirqs as RT > threads (like irq threads) makes a lot more sense. At least one would be able > to use priorities to reason about when it's okay to preempt them or not. > > If I got it wrong, why we can't do that? We can't do that right away because some softirq vectors may rely on the fact that they can't be interrupted by other softirq vectors. If they use per cpu data, they can perfectly assume that it's locally softirq-safe and not use any lock to protect it, provided the data is stricly per-cpu of course. So we'll need to check all the softirq handlers and make sure they don't do such assumption, or fix the site. I can imagine it as an iterative pushdown just like we did with the big kernel lock. Thanks.