Received: by 10.223.148.5 with SMTP id 5csp6348802wrq; Wed, 17 Jan 2018 12:32:20 -0800 (PST) X-Google-Smtp-Source: ACJfBotn/iHWEw/nf0X5qmA5IR/4AMYqeIVkf+gO1q/y7My4M4k5J0vN8H5J1HvtF5yUbwF3j1zJ X-Received: by 10.98.66.67 with SMTP id p64mr32528866pfa.227.1516221139923; Wed, 17 Jan 2018 12:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516221139; cv=none; d=google.com; s=arc-20160816; b=kRknPe3QcuuH1VgdeCmtkO6glyZUlrApitxqt5qxyJZ64+j0tM9JpCaTNeyQwe+seo Hi4Rq7aUPZjnGDG8yQuDex+SOgwa4nU9q8PVYZtg5agfQVPR1JsUXhdgbJNOwXgqJghu 9SHAJgOMALl62waPmp5K/y1L2A42hdw5WuPK3tN4hwotczrc2z0m6cq9X8R8R/CzeWW0 jp5hfXK9WQ4KpXYluNTNK3AnvIwep6gBup2MExTvzPk3igoFd07W6NcYHNInH0RLUaT2 iA/rslA38332wO3UDt2kyM/3FdECOHnBzxdl070aaFuWomMtbxLWW4OyJzM/UuDpSpdP f6Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=i7OLWShB0zX7PfX5gTnnLkYWJMH+YKj8u65IniOHNGk=; b=JDcb3RCQ2lTIUrWRGlbyxOOPizPEFzktsydIHI29cwIyhOV9Il1If15k76e0llDAQ+ ldz4QVv9l64rqnf4grrtSQGsnFVgkCt4kYyGyVB3b6rXABMy/6JBAeJJvMuULMMm+7Cx LjvVZXeH4fROaP/LyqMnAgQ2O3IVpzBL1023KB/Y1QKiy/7+/JxL0ebwXcGMpvmg399j qlT0TA1iDqur37uH3D5yu8DwIEZtOacnEmViC8fVQr0Yi8HJaS8H14eTWxEqJtu8nvAe G2Y+UvfTmJfKmoKVRgfNmm2GLNz6lMDcRFYGoFIK2NxjyhmaSRgsui/k4YCQn91SBRlR /C1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o62si4441919pga.342.2018.01.17.12.32.06; Wed, 17 Jan 2018 12:32:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754067AbeAQUa4 (ORCPT + 99 others); Wed, 17 Jan 2018 15:30:56 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:35944 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbeAQUax (ORCPT ); Wed, 17 Jan 2018 15:30:53 -0500 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id CE86E1089BD36; Wed, 17 Jan 2018 12:30:50 -0800 (PST) Date: Wed, 17 Jan 2018 15:30:49 -0500 (EST) Message-Id: <20180117.153049.1803664333084879932.davem@davemloft.net> To: efault@gmx.de Cc: torvalds@linux-foundation.org, peterz@infradead.org, edumazet@google.com, dima@arista.com, frederic@kernel.org, linux-kernel@vger.kernel.org, 0x7f454c46@gmail.com, akpm@linux-foundation.org, fweisbec@gmail.com, hannes@stressinduktion.org, mingo@kernel.org, alexander.levin@verizon.com, pabeni@redhat.com, paulmck@linux.vnet.ibm.com, rrendec@arista.com, riel@redhat.com, sgruszka@redhat.com, tglx@linutronix.de, wanpeng.li@hotmail.com Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context From: David Miller In-Reply-To: <1515782670.7007.3.camel@gmx.de> References: <1515780912.21898.45.camel@gmx.de> <1515782670.7007.3.camel@gmx.de> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 17 Jan 2018 12:30:52 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Galbraith Date: Fri, 12 Jan 2018 19:44:30 +0100 > On Fri, 2018-01-12 at 19:15 +0100, Mike Galbraith wrote: >> On Fri, 2018-01-12 at 09:51 -0800, Linus Torvalds wrote: >> > On Fri, Jan 12, 2018 at 9:44 AM, Mike Galbraith wrote: >> > > >> > > Nah, a misunderstanding happened. RT that still offers full threading >> > > creates per-softirq threads per cpu. The regular trees split ksoftirqd >> > > into only two threads per cpu, one processes timer/hrtimer softriqs, >> > > the other processes the rest. >> > >> > Ok, that sounds like it should work, but it also sounds like it's very >> > specific to RT itself. >> > >> > For example, the dvb issue was not about the timer softirqs, but about >> > the tasklet ones. >> > >> > So maybe we wouldn't need to split it for _every_ softirq, but we'd >> > need to split it more than just along the timer case. >> > >> > And it does sound a bit excessive to have ten fixed threads for every >> > CPU. The days when tens of CPU's meant "huge system" are gone. These >> > days it can be a phone. >> >> Yeah, it is excessive more often than not. You get to prioritize, and >> segregate, which is nice, but you pay for it. > > BTW, much of the softirq load in RT is processed by the raising task. > > tbench_srv-6985 [000] d...112 293.902511: softirq_raise: vec=3 [action=NET_RX] > tbench_srv-6985 [000] .....13 293.902511: softirq_entry: vec=3 [action=NET_RX] > tbench_srv-6985 [000] .....13 293.902515: softirq_exit: vec=3 [action=NET_RX] > tbench-6984 [003] d...112 293.902520: softirq_raise: vec=3 [action=NET_RX] > tbench-6984 [003] .....13 293.902520: softirq_entry: vec=3 [action=NET_RX] > tbench-6984 [003] .....13 293.902523: softirq_exit: vec=3 [action=NET_RX] And this is because tbench runs over loopback, which triggers softirqs in the context of whatever generates the loopback packet transmit. Which in this case is the tbench process calling sendmsg(). I wanted to chime in about this earlier, and make it clear that it isn't just IRQs that can trigger softirqs. User context actions in the kernel can trigger softirqs too.