Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932701AbeAKUkK (ORCPT + 1 other); Thu, 11 Jan 2018 15:40:10 -0500 Received: from mail-ot0-f174.google.com ([74.125.82.174]:44154 "EHLO mail-ot0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbeAKUkJ (ORCPT ); Thu, 11 Jan 2018 15:40:09 -0500 X-Google-Smtp-Source: ACJfBosvKN2rOuxhgykieR4YwG+mq2X61vHLJkL7JH9h1csHQEgGugZMQweQFopRfjOITOgBax79haO0MC/HETFsLyk= MIME-Version: 1.0 In-Reply-To: <1515702883.3039.27.camel@arista.com> 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> From: Linus Torvalds Date: Thu, 11 Jan 2018 12:40:06 -0800 X-Google-Sender-Auth: OZunwIXMxsAdpCEYOKHkJzcqNe0 Message-ID: Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context To: Dmitry Safonov 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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. 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). Linus