Received: by 10.223.176.5 with SMTP id f5csp2350123wra; Thu, 8 Feb 2018 12:31:41 -0800 (PST) X-Google-Smtp-Source: AH8x227dh3Dhz/QKNJp9LEyx6n4XMGTs9go6D8xX1Q8ViHFTN32hOzlaVi7nHgQDg33t81W4POdG X-Received: by 2002:a17:902:7848:: with SMTP id e8-v6mr246560pln.386.1518121901443; Thu, 08 Feb 2018 12:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518121901; cv=none; d=google.com; s=arc-20160816; b=wnjhiWsUBXWpuYybWJIW7UhmEH/GAyeVLICg0Siszp/dXWfg8BHmc8IIeLRDbI2IK8 jD9MfyMO0SxIMTceErxoeAzO4fnxWk7ksHrJor+fzLakr92ij5bnUTGBOBtyI5P9L09Z 9icygLLh2btRo8Kllzy5UcdGaNxJzXPw4MLMiEkmfrEglZEsRpCprjt7fjYEtjBITgrG y3BR/UFQQl5vzSJL8L/mf19pJG538TNtC6a648AOh/DQTlHEqnw8O53xu8/sxxuWnYNs HunauLETddbQO9iUWuO+c15g7rFFoWCJQX2nqA161p5zhO8VYjBQWW2Ds1mOBYsAby0Z jrUQ== 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:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=Mk5tLaW9Faklnews2+XGrXokkTioOqKAC2krzYO1BxM=; b=yAnUA3GSbd3w1msSMxzwVRkmxh4623yIzDsOK/of/tXA8eVKPDCM9YAFeduLjXo/0L JOytSIhJH2CmpkskENxhjHEFUQCxmuqfKZVmTveFeIXLqIFoVjGn46ygvnRMIxDxbZFK eXDCFNzaBQaWq+tvciEyHrHsbJIY+mQgU/HFQXSX/Qz7AX2FIHbOc3Tcd0ovXolsqGi1 5OgeLc3cx2qRhH5BYvlH8w9++0p/iCDdXfZY3tj+aItYZavstQpHzt/6naAj2fNGYCC0 Q8QiWjjKNyjU98N1xobQuIVnvyFKgL983FKC7MqYXSuJUmfLU+B4ouWLYviOGWO2CbAc MTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=Y2q+1HQG; 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; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1-v6si428057pld.106.2018.02.08.12.31.16; Thu, 08 Feb 2018 12:31:41 -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=pass header.i=@arista.com header.s=googlenew header.b=Y2q+1HQG; 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; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbeBHUaY (ORCPT + 99 others); Thu, 8 Feb 2018 15:30:24 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35432 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbeBHUaX (ORCPT ); Thu, 8 Feb 2018 15:30:23 -0500 Received: by mail-wm0-f65.google.com with SMTP id r78so12407247wme.0 for ; Thu, 08 Feb 2018 12:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mk5tLaW9Faklnews2+XGrXokkTioOqKAC2krzYO1BxM=; b=Y2q+1HQGvlt+hWGH1WGLaMva0jG4iJOt/uvjrPE/dcE2n8Sjj2NrgT8g4RiizdBywn S3WB0/d8a42UzfBon9E3N1gzOrkE4utvo8aNo4zdJ4DxD+BpTMDKLfck9RErL2JxQM25 bVN57PQZFKm3S/k+d3oVl1Fi5K71BwKl3k9xQy+bbZ11ef000ZoGpb5ZoDhg2ipbVIY/ dzeKiNST6xYKhSYpkhCtrirlRhh7RsLQctanvVtT+vrPklYl/ZCU01qGE7FmbaqgNW9Q i+ojvWqTfl92HS+0ZxmcPnqCBx1T7BR9f8aJndtwhTYiddsHMyJyRmRYv8BLnEW1Rojt Lmow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mk5tLaW9Faklnews2+XGrXokkTioOqKAC2krzYO1BxM=; b=V48W8X7d7nmQ++73t46v5ygB8S6rNgCCEV1w5AYgx0jDAeD0N7ZFlovsdZ334c4tPE vv5jL2LFEvWANEhcjNDsBUwnRcgPMuLUBV4ZmFJvfe9B2Tsak1Ooxxb9dgpbzz+3XKBb OVPSbyKK7VvFIrPdyM6KPMDkgNv6z3If6Szo37fGNIdmJu5LCak/eIwFAsd8SQBZuQYw odZYBIym79VVfjr0nzwWrmcv7dbYG2yewnCB2GVQ/YtivElFghG3zS8+5+DfROMppSvp LDrkUTDFx0t/oojysuZTs9QLh8lRZQDyhpaa1fpgq5rt+8GDE8bdJxABlF8p2PdjVDGC H76g== X-Gm-Message-State: APf1xPAfqgWdLyJ8LXlHC/4Y2BlrU1nnuioNwcFXqcIjYLn/Zl8j8dwz iyGtbEpibImnaGn6ajinIolZqw== X-Received: by 10.80.129.225 with SMTP id 88mr517955ede.19.1518121822133; Thu, 08 Feb 2018 12:30:22 -0800 (PST) Received: from dhcp.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id i32sm330046eda.89.2018.02.08.12.30.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 12:30:21 -0800 (PST) Message-ID: <1518121820.2849.17.camel@arista.com> Subject: Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue From: Dmitry Safonov To: David Miller 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 Date: Thu, 08 Feb 2018 20:30:20 +0000 In-Reply-To: <20180208.152236.2148696725742511754.davem@davemloft.net> References: <20180208174450.qjvjy752jf4ngt2g@breakpoint.cc> <20180208.134506.1374787894560277876.davem@davemloft.net> <1518120895.2849.14.camel@arista.com> <20180208.152236.2148696725742511754.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > 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? 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.. > > 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.