Received: by 10.223.148.5 with SMTP id 5csp6444870wrq; Wed, 17 Jan 2018 13:56:06 -0800 (PST) X-Google-Smtp-Source: ACJfBouMYFfjUkTshKHqJ7FUp1UvDulZ2hc9ewhYyQqLjtaBJ5cvvebzfUXXot3iuz9U2qDkzqM7 X-Received: by 10.84.194.163 with SMTP id h32mr5089793pld.56.1516226166194; Wed, 17 Jan 2018 13:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516226166; cv=none; d=google.com; s=arc-20160816; b=W/B/8IamfSf7KDuciatQ+8HfGb3FZBD1GoQ/2WLSp0dStiVIxJuo4xj6W/lrivyTSe f6P158t0NG4M0V2FvQArdNE11T32QW/HxydC8X0mrh/oaHEuS+F/6oSU7PGJ8WZ5M4Kw s9DduDcDZgDe5b1Zeq/78ThJflxVQhRHitt/kMgYwqMPVtsE0XnZ/LE45DYcKEBPMpPb H1Uyz24jKSO5xmY0ahCtg9LMdIE2lW/Q0m4WHf6TdPv4StiXqcTM+yRT5o7q8cQwURx+ DTHsxG/HZPOtdUAU1pl0GhpMo7KuUe7xeTrLEDA6izdouxWP+0kZk2xdMT4QOSkHB+9Q izZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=roLS7CCpYUiSLfQN8i5uQdNIGkqNz7okpPXqDFi530Y=; b=K7Wud/HkiM2iTZPqzJ9SX7ie5Ky5GIEBIGwsHPG4Auz31i7OBMEr2PykRPARg2kkH9 qcfM7lw99AYsMS6BhSaReDi/iN6nsDvR2neroCAWTlYupruAbH+iUWkcGOG7LuwJgzPT ioOcdHlylb8T/6gZ5br5mqQsfG6w1dMz6WF3u5cEWlm92Rj1uZ+l2KMSxiBwi6J4s8As TGY1LRaDQIYkHrGoRmR10aEOefjRdyzOCksoxHo7bAFw6DhpQWhwIG1LIcTIqln3CsjH 0R0pmbp32N35HPaLAMFg3WdcbLf0+D3HiOfBxwrFTK6c/WrrVnaeTjdGX0pS5690Ma/a eDpg== 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 s59si5389966plb.751.2018.01.17.13.55.52; Wed, 17 Jan 2018 13:56:06 -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 S1753810AbeAQVyX (ORCPT + 99 others); Wed, 17 Jan 2018 16:54:23 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:47476 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200AbeAQVyW (ORCPT ); Wed, 17 Jan 2018 16:54:22 -0500 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ebvcX-0001Rr-Vj; Wed, 17 Jan 2018 22:51:46 +0100 Date: Wed, 17 Jan 2018 22:54:11 +0100 (CET) From: Thomas Gleixner To: David Miller cc: torvalds@linux-foundation.org, efault@gmx.de, 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, wanpeng.li@hotmail.com Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context In-Reply-To: <20180117.164932.1269304606476934540.davem@davemloft.net> Message-ID: References: <1515782670.7007.3.camel@gmx.de> <20180117.153049.1803664333084879932.davem@davemloft.net> <20180117.164932.1269304606476934540.davem@davemloft.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Jan 2018, David Miller wrote: > From: Linus Torvalds > Date: Wed, 17 Jan 2018 13:06:58 -0800 > > > It was in some way always a "poor mans interrupt thread" (with no > > blocking like a real thread context, but at least not impacting actual > > interrupt latency). > > Or in this loopback device case (and tunnel decapsulation) a poor > man's longjmp, releasing the current stack frame to keep the depth > in check. > > Anyways... > > > That said, this made me wonder a bit. I wonder how bounded the latency > > is for raising a softirq from process context. We only _check_ the > > softirq on the last hardirq exit, I think. > > System call return checks it, otherwise this situation would be > completely bolixed. Errm. No. > > > I wonder if we should run softirqs on return to user mode (and make > > softirq set a thread flag if not in interrupt context). > > I'm pretty sure we already do. Nope. raise_softirq() -> raise_softirq_irqoff() set_softirq_bit(); if (!in_interrupt()) wake_softirqd(); So if the caller is not in hard or soft interrupt context, which includes bottom half disabled regions softirqd is woken. If the caller is in a bottom half disabled region then local_bh_enable() will run the pending softirqs. Thanks, tglx