Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754353AbeALFYI (ORCPT + 1 other); Fri, 12 Jan 2018 00:24:08 -0500 Received: from mout.gmx.net ([212.227.15.18]:58769 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbeALFYG (ORCPT ); Fri, 12 Jan 2018 00:24:06 -0500 Message-ID: <1515734588.10188.36.camel@gmx.de> Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context From: Mike Galbraith To: Linus Torvalds , Eric Dumazet Cc: Peter Zijlstra , Dmitry Safonov , 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: Fri, 12 Jan 2018 06:23:08 +0100 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> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ILlnwYVDYZtRo3ZkOSouTsFp0wUdqDjgIE0ocIYPXeXYexTchoq k48IAqSPYwKTwL7g01F+kc7w0+/h7qplHrJ/2awjEUKM1t5C4ZYxkCg0qAavb6TWpcXij+x OsRwntkCOXPMT+MWF6RhlOjENj7b5q3+rSWDRQVjS4ZUNkE65LECotRps45rjWiXuj9qoae b9H1xyrrYVNdfM+6638kw== X-UI-Out-Filterresults: notjunk:1;V01:K0:sCPZ3baIA04=:yshnRg8viS4n9GwEvJ/bze xIqgZ5tf69N2QFCYdurgYBqtGhsVWT2cquM6o49cruZUQoe6jO8idc5mqJnFpWUKLD4CY9Fa9 ikprIv3aVTqrH95crtU290Pu2ovlzT1ywFQmjR106O/tj3bdRMEl/27NsGk98MaTzLlyI2HEt ituCDUPvgpxgrTAVypf4yCP531dI2m9Bp8zjA+SU3zdB25ZSghSo/oAnG03f2DwgX9xES8Qps BGakrUMe/MV1i/t4OHRaK1T1sh7wW8uTgyVsP1dmS5NLolLVPVaRFE+zhbQZWVRP3dwwkZp6S tHP++8aB7Z/oxJ+ST50rRccLvDTOnuh/+/Vasv9ItZp2Q9z/P4kJzFRSuTbC1CPvHWfid5bmO 4b2JrDooGCapDtU9sA7cyJ7zwRZpTRLo7hYbZSfogEiYZgEV5xEOZF+o+BR1LT0RZG7TVv5A+ MVWdf0m2z9f+5It/AdcmithkpWIzczEAZ7U8I5GNK/57KUTV7lL7vCysH8ieHMCns99LVz5/n wcbQhyMR6LQEvINDL5NqIB3XcapDAuDkMNEypSc2mTvEwe3BXXkSIKWeQUO41bZyDj2eAIj0W rsXr9jUuL+3Zix4eOf34dQlwaHD16ViMDXrwRzJYr2m/lsk3T+iIkJWvnpQU2/XTz6XDeSYgc rbx5e1u2nawizW7DiV8DAHcoATTMQb2qEIQXVpRLweS5u5YSJawzNhAM2OKJ3lJ2FmtIwcDSh O/gSpSBrZs8UXCF496uG041BJfnBG0TLARBwMo4AdmzpF4jV00M8QcxDU2yCPpAsLbS8vJ1gb z/+WABS+fdM0aYyVVy9EBtzQCVuPh8B3KIOzWp3Vj7o1l2qGaY= 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:22 -0800, Linus Torvalds wrote: > On Thu, Jan 11, 2018 at 12:16 PM, Eric Dumazet wrote: > > > > Note that when I implemented TCP Small queues, I did experiments between > > using a work queue or a tasklet, and workqueues added unacceptable P99 > > latencies, when many user threads are competing with kernel threads. > > Yes. > > So I think one solution might be to have a hybrid system, where we do > the softirq's synchronously normally (which is what you really want > for good latency). > > But then fall down on a threaded model - but that fallback case should > be per-softirq, not global. So if one softirq uses a lot of CPU time, > that shouldn't affect the latency of other softirqs. > > So maybe we could get rid of the per-cpu ksoftirqd entirely, and > replace it with with per-cpu and per-softirq workqueues? How would that be better than what RT used to do, and I still do for my RT kernels via boot option, namely split ksoftirqd into per-softirq threads. -Mike