Received: by 10.223.176.5 with SMTP id f5csp2344017wra; Thu, 8 Feb 2018 12:24:47 -0800 (PST) X-Google-Smtp-Source: AH8x2248j3d0sHqVYsryyX2GGq2WTSX6cE5I5+1nYr12V48poKfJmHAIME6e1GeHsdt7CPWsrQFV X-Received: by 10.101.82.203 with SMTP id z11mr338259pgp.164.1518121487144; Thu, 08 Feb 2018 12:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518121487; cv=none; d=google.com; s=arc-20160816; b=yZeMBXTg+37V0lw5CPPwkxtEFZE3jqgbcHQ2vQFghUgkyCh3yiyRvtvd4nNmCN8PRC 2maNFXtrEuC9zX22MDcgAa0efsc3RIzFSO+1WH0QHqTv4sd0Z0L8wKgI/kXHyP8Rk9iw Siu76P9xS5F2M+FWiN9fhKxe1p52eG4SOwLuWoU8XkAeZ+uVhaMV7Vu7904jiMhjRfcT C25PSwXZW9V7RoiUQwnuHez5xuXqgwyzvPKLelN4BZR5nSu3EJOKiVjpLeddmk4nLiEW kSv3nctQY5RjuDTWHMTjFFUw37GaA9vDWqE/L8Tm9rrsWMYFy0heyONtsFQAXwM0HfE7 aFmA== 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=zUtnNxmlXqDkEEZYV1SSIZUA0r8Q+RdI8+xzJmOV7ZU=; b=aygI669sD8nIpA5ON8+HIi7aNVpKK86ZJid4f6A6VspSJmWvdb4tmKZvRzFl4XPrGv Nnrf4dG0chT2C4LJk8XWmxHdtqnIlGZoPToaUxhgfE0Gj55VYFtVxKNITZCrZ3vPlgdo JLegu7EldPfvF9MdW371YLPMdj7iwXKZBmIgtvQaGyFo/sMnbnhj+oPHwW83qy65VTni OSYBqPJ9XZsimnAIn2Bk27JOuqGzNbj8FUqVNq7kEdWCHBGnsv6DduQVW9letjpOGN9/ TiUEouuYn0kmEsFnINlh0szH9yz7TlWg/ctdaEw9tEf/ExG/ojk1HEjR5mAAg3XR/avD dixg== 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 m8si379619pgs.272.2018.02.08.12.24.31; Thu, 08 Feb 2018 12:24:47 -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 S1752547AbeBHUWm (ORCPT + 99 others); Thu, 8 Feb 2018 15:22:42 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:49002 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbeBHUWk (ORCPT ); Thu, 8 Feb 2018 15:22:40 -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 E4D3311D69852; Thu, 8 Feb 2018 12:22:37 -0800 (PST) Date: Thu, 08 Feb 2018 15:22:36 -0500 (EST) Message-Id: <20180208.152236.2148696725742511754.davem@davemloft.net> To: dima@arista.com Cc: bigeasy@linutronix.de, 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 From: David Miller In-Reply-To: <1518120895.2849.14.camel@arista.com> References: <20180208174450.qjvjy752jf4ngt2g@breakpoint.cc> <20180208.134506.1374787894560277876.davem@davemloft.net> <1518120895.2849.14.camel@arista.com> 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]); Thu, 08 Feb 2018 12:22:39 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Safonov Date: Thu, 08 Feb 2018 20:14:55 +0000 > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: >> From: Sebastian Andrzej Siewior >> Date: Thu, 8 Feb 2018 18:44:52 +0100 >> >> > May I instead suggest to stick to ksoftirqd? So you run in softirq >> > context (after return from IRQ) and if takes too long, you offload >> the >> > vector to ksoftirqd instead. You may want to play with the metric >> on >> > which you decide when you want switch to ksoftirqd / account how >> long a >> > vector runs. >> >> Having read over this stuff for the past few weeks this is how I feel >> as well. Just make ksofbitrq do what we want (only execute the >> overloaded softirq vectors). >> >> The more I look at the workqueue stuff, the more complications and >> weird behavioral artifacts we are getting for questionable gain. > > What about creating several ksoftirqd threads per-cpu? > Like I did with boot parameter to specify how many threads and which > softirqs to serve. Why do we need more than one per cpu? There is a set of vectors which are "overloaded" and ksoftirqd processes them one by one. The only difference with what happens now is that one softirq being overloaded doesn't defer the processing of all softirqs to ksoftirqd.