Received: by 10.223.176.5 with SMTP id f5csp619263wra; Fri, 9 Feb 2018 04:36:34 -0800 (PST) X-Google-Smtp-Source: AH8x226zxUWepPBEBxvvITzt0Sj9w+Qevp8LF0dwLzTX1+jekZihFAv/JlnGEs/zQtlEXvXDSCXX X-Received: by 10.98.226.22 with SMTP id a22mr2400334pfi.24.1518179794822; Fri, 09 Feb 2018 04:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518179794; cv=none; d=google.com; s=arc-20160816; b=n/JzKrlhrZYgB+M7n/obfsuAzZWOUFw4Allb1NFpDeeeu+SKeKQz0KVb1j3XRIp6nn ltB8zjlqV/TkHtk32UPo6amyeVQzU+YwnCjFUF2OlJUp9S7vzeoYzXP2gj6zkkveCwTX u5Ue3x9Cw0yGwYEu1oJUD3mAVfsevBKX1owjTMYBtxoGZ/kAMQrwt5oi+cXYRXWoyP8f NXEXWo0tfq2cYQzFZvH8zUv+i9nNqWgD7NcY+wDL3XeVkxaz1/NbYqFjCaDCsj3JmxCh CdY5iF/hF41pp1iIOXyIpYuLcRe/Mw8g21xWl8ISP1ocrx3sZrR3Rg/3IWyBHaFc/jVF GB6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0Ul/IlzvNaThXW5znnovteHsYRIVwmboA+otxYufbHM=; b=w11kTTSDiK9yl3J5Zytduh7jkcHCdyNpJnrJUcpfkp58yNphr3UdvYiC8VF06dBBOx gOhXZalP1uY5tb4yJYIoF5bYgX/xgR47e/d4O/lpRNfp8KT2O+fmdi51FcwymKiooK9d YcYJHkV8g7AiAvinKyQjJQ1gqCdbmrBBmNyFxjYmQhaQNUxgp8xqv4Bac+v1buih1uBJ xE19OOqhXCs3827t1sa4K7e1edP/zo0bbiCUHfMgHa1mpPdxCUIOAfk9BVvgKVY7g27T gWcg+zTu8GhpUh6Avhg2wM5j3z2SMP2IGVqIYDvr0Wje/fPboPMBLV1v++/N+SR/2rQ6 O7ZQ== 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 d90-v6si1493849pld.193.2018.02.09.04.36.20; Fri, 09 Feb 2018 04:36:34 -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 S1751124AbeBIMf0 (ORCPT + 99 others); Fri, 9 Feb 2018 07:35:26 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:34374 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbeBIMfY (ORCPT ); Fri, 9 Feb 2018 07:35:24 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1ek7qW-0006o1-Uy; Fri, 09 Feb 2018 13:32:05 +0100 Date: Fri, 9 Feb 2018 13:35:10 +0100 From: Sebastian Andrzej Siewior To: Mike Galbraith Cc: Dmitry Safonov , David Miller , frederic@kernel.org, linux-kernel@vger.kernel.org, alexander.levin@verizon.com, peterz@infradead.org, mchehab@s-opensource.com, torvalds@linux-foundation.org, hannes@stressinduktion.org, paulmck@linux.vnet.ibm.com, wanpeng.li@hotmail.com, tglx@linutronix.de, akpm@linux-foundation.org, pabeni@redhat.com, rrendec@arista.com, mingo@kernel.org, sgruszka@redhat.com, riel@redhat.com, edumazet@google.com Subject: Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue Message-ID: <20180209123510.2qxgkky5juejjvcg@linutronix.de> References: <20180208174450.qjvjy752jf4ngt2g@breakpoint.cc> <20180208.134506.1374787894560277876.davem@davemloft.net> <1518120895.2849.14.camel@arista.com> <20180208.152236.2148696725742511754.davem@davemloft.net> <1518121820.2849.17.camel@arista.com> <1518149468.24350.40.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1518149468.24350.40.camel@gmx.de> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-09 05:11:08 [+0100], Mike Galbraith wrote: > On Thu, 2018-02-08 at 20:30 +0000, Dmitry Safonov wrote: > > On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > > > Why do we need more than one per cpu? > > > > Ugh, yeah, I remember why I did it - I tried to reuse scheduler for > > each ksoftirqd thread to decide if it need to run now or later. > > That would give an admin a way to prioritise softirqs with nice. > > Not sure if it's a nice idea at all.. > > For RT that can be handy, but for the general case it's a waste of > cycles, so would want to be opt-in. We used to have it in RT. It got replaced because the context switch from one thread to the other simply took time. If you need to prioritise one softirqs over the other I think you would be better off running with threaded-interrupts. In "normal" mode, if you have a raised NAPI and say a TASKLET then once both IRQ handler complete (and interrupts get enabled again) then the softirqs are run. With threaded interrupts enabled, the NAPI-softirq is invoked once the threaded-handler completes that raised it - same goes the other threaded handler which raised the tasklet softirq. So you could simply change the priority of the threaded interrupt in order to prefer NAPI over tasklet handling (or the other way around). > -Mike Sebastian