Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754345AbeAKUqb (ORCPT + 1 other); Thu, 11 Jan 2018 15:46:31 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35268 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeAKUqa (ORCPT ); Thu, 11 Jan 2018 15:46:30 -0500 X-Google-Smtp-Source: ACJfBouisMbPj/woZGlEiCEHtdFgzBeNBm60DpdiVVmHwdjA7fEtAagnVuiFuRL1+JfDtu/ueyp2/A== Message-ID: <1515703586.3039.30.camel@arista.com> Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context From: Dmitry Safonov To: Linus Torvalds Cc: Eric Dumazet , Peter Zijlstra , Frederic Weisbecker , LKML , Dmitry Safonov <0x7f454c46@gmail.com>, Andrew Morton , David Miller , Frederic Weisbecker , Hannes Frederic Sowa , Ingo Molnar , "Levin, Alexander (Sasha Levin)" , Paolo Abeni , "Paul E. McKenney" , Radu Rendec , Rik van Riel , Stanislaw Gruszka , Thomas Gleixner , Wanpeng Li Date: Thu, 11 Jan 2018 20:46:26 +0000 In-Reply-To: References: <20180109133623.10711-1-dima@arista.com> <20180109133623.10711-2-dima@arista.com> <1515620880.3350.44.camel@arista.com> <20180111032232.GA11633@lerouge> <20180111044456.GC11633@lerouge> <1515681091.3039.21.camel@arista.com> <20180111163204.GE6176@hirez.programming.kicks-ass.net> <1515702883.3039.27.camel@arista.com> 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, 2018-01-11 at 12:40 -0800, Linus Torvalds wrote: > On Thu, Jan 11, 2018 at 12:34 PM, Dmitry Safonov > wrote: > > > > I could try to write a PoC for that.. > > What should be the trigger to fall into workqueue? > > How to tell if there're too many softirqs of the kind? > > I suspect it would have to be time-based, probably using the > scheduler clock. I thought about this, but I was a bit afraid of how much pricey it would be recalculate it each clock. Well, might just try to write that and measure the impact. > Most softirqs are really really small. So just counting them probably > isn't all that meaningful, although the count is good as a fallback > (as shown by the jiffy issues). > > The good news is that we only have a fairly small handful of > softirqs, > so counting/timing them separately is still mainly a pretty small > array (which needs to be percpu, of course).