Received: by 10.223.148.5 with SMTP id 5csp6397589wrq; Wed, 17 Jan 2018 13:07:48 -0800 (PST) X-Google-Smtp-Source: ACJfBouruqfxaw2MCjKgsNprfBr6ULFWB1w7tDd0+8T8U4e1FscebX86oICOPJj7Bcmdx0inrWGw X-Received: by 10.99.116.22 with SMTP id p22mr30170864pgc.4.1516223268557; Wed, 17 Jan 2018 13:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516223268; cv=none; d=google.com; s=arc-20160816; b=IYnv5DhGorKPm3insXCfmSLfUKTmyqRXQJ+Nc40bo+hPSiil1ogNxS3r1gIPHK7zFe A2I8E5LvT0pKjHyde4L7OGdV/fuHwwhBz/503zf1gWlXYSdoFPklgD3IFhelRN9G7zar MEXIsFAR/H+pErxz04H4fAeR/klWtLXR8YPBuLWHQIfPP5Pbb6rd131Vf40WalDHNOQ6 COEvoUO2CLGWpcnFw9Kbn48VHl74SoUy73LPBiBxPoBxTpvNshT7pGeitkPVnrXKJIk8 HDGJXGJU20qvXpRKQ+omx6zU9QQ3jomd1rNFYY5deQkRlgKK/ARMs8QW/0fDiG+L40zI oz+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hScfZ3QyqHs38nboUuavItHDQxx0eLnWe+8tSokKpr8=; b=g2xgzAIwgJatbnkOy9VNpDorFDq5j+qLDJmK/wY8nv03pd8fbNDuANN5YoeIklgkSc mTeTvSlQqbfbDK1kv0FJULrbinRFcWLz6PbYTzDieNmMOeNI/wRvtbVHRFY6SqVKM2VD i7iueSIbiWfkdMTrvJFc/rQmGRZwQfltAFzBAJSnodg9RgnAJAO6rTBtYZ8Hp0BTiS7c 5SaJKHYGL3GSuAWMEij04/x292dSv1RFq0/9zCx7PQ/fMCZUzCD3OmJtr8QYOT+fxdRK DV4znh/MMcnGRfAz9v4CtM41gvBsqr3sS6EVeYtxLG0x7jgthCk+GStJEryEotQnd6x9 UWIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PUwff5v9; 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 t11si1779891pgn.285.2018.01.17.13.07.34; Wed, 17 Jan 2018 13:07:48 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PUwff5v9; 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 S1754151AbeAQVHE (ORCPT + 99 others); Wed, 17 Jan 2018 16:07:04 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:43332 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753514AbeAQVHA (ORCPT ); Wed, 17 Jan 2018 16:07:00 -0500 Received: by mail-io0-f196.google.com with SMTP id w188so22403990iod.10 for ; Wed, 17 Jan 2018 13:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hScfZ3QyqHs38nboUuavItHDQxx0eLnWe+8tSokKpr8=; b=PUwff5v9e95TXxh2bv8gZKi/YtxxmFglUR36IDJ9pUJ805s/VTPg7FJRJXHO34jECw rjUHBgVnE5LRkwqBiOKTUPSNIkzUX6YnjtMOrZNwVdMHm17hNWbQgpqpkboPmlxsbg4l 7LLwbJO6tO5gE+wXh+cpAqxrGHguwdT8mTHn6UFxP1nWJzvU61ELiJ2C1Che2QCs6f5N FKzCrbHzsSY6fZIOiA5hBdFfoxSREDhtIeGVGhFXcV11VGufnSUdM4V0CrZdkEqnbyF0 ed43qlAMxYk3x1ylH1sTVkkHm4hrmqqd6c8knZPP86N8OTDzbvJqKID1TCNoD9zXOsgy o1wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=hScfZ3QyqHs38nboUuavItHDQxx0eLnWe+8tSokKpr8=; b=QFVh4oS5sxgCQ7tB/9bZBZh2NPmns5wd6jQ14wms/o+DG+kokvdnTqgV1hEWRP5tLv D6WDTX1t+c/uN/57ptH12wFPxzcZMTcnMBoEc1bXw+IpEQo/87DEFYWwjWhM2BFXvoH9 YmqotZsQyIAW1C0VecOjb+gOqbknp7RTyHjC/uHTSmZ+PVnRqIn98368X8UqyTXi0v4G VP+t+Q9QytrNtsD3u/f9atLx7uT0LHCiIARU3rJmKGHFt2Fv41qMA82EvMossB1pDOyY vvUhllPe3ZJfBIXHHNhwzXO0NceuKis21eHr01le4O1re7NJEARLtXQeuqj27kFsJUWR ynbQ== X-Gm-Message-State: AKwxytejgCiq6uq6oU36Is63A46220buPKtPO1bX3kSRCDiW9l8WL4h1 vsSRCS+MXgNGm9tu+8ePytuWoxKYLwOHZoLUPvo= X-Received: by 10.107.132.3 with SMTP id g3mr27837827iod.46.1516223219168; Wed, 17 Jan 2018 13:06:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.6.147 with HTTP; Wed, 17 Jan 2018 13:06:58 -0800 (PST) In-Reply-To: <20180117.153049.1803664333084879932.davem@davemloft.net> References: <1515780912.21898.45.camel@gmx.de> <1515782670.7007.3.camel@gmx.de> <20180117.153049.1803664333084879932.davem@davemloft.net> From: Linus Torvalds Date: Wed, 17 Jan 2018 13:06:58 -0800 X-Google-Sender-Auth: G5DZHWjlqIshzGTOBRmyglhkOMY Message-ID: Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context To: David Miller Cc: Mike Galbraith , Peter Zijlstra , Eric Dumazet , Dmitry Safonov , Frederic Weisbecker , Linux Kernel Mailing List , Dmitry Safonov <0x7f454c46@gmail.com>, Andrew Morton , Frederic Weisbecker , Hannes Frederic Sowa , Ingo Molnar , Sasha Levin , Paolo Abeni , Paul McKenney , Radu Rendec , Rik van Riel , Stanislaw Gruszka , Thomas Gleixner , Wanpeng Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 17, 2018 at 12:30 PM, David Miller wrote: > > 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. Yes, anybody can do that "raise_softirq()" thing, although the common thing tends to be for it to be from an interrupt that wants to delay more long-running things to a non-irq-dsiabled context. 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). 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. We latency was traditionally bounded by the timer irq, and non-idle CPU's should still be running timers. But I do note that networking does seem to have some private hacks for the latency problem (ie net_tx_action())? I wonder if we should run softirqs on return to user mode (and make softirq set a thread flag if not in interrupt context). Although maybe some people actually want the "delay until next interrupt" kind of behavior to throttle things if they do softirqs from process context. That sounds unlikely, but who knows. Linus