Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933957AbeALO60 (ORCPT + 1 other); Fri, 12 Jan 2018 09:58:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:55840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933764AbeALO6Y (ORCPT ); Fri, 12 Jan 2018 09:58:24 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD40F21722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org Date: Fri, 12 Jan 2018 15:58:21 +0100 From: Frederic Weisbecker To: Mike Galbraith Cc: Linus Torvalds , Eric Dumazet , Peter Zijlstra , Dmitry Safonov , 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 Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context Message-ID: <20180112145819.GC1950@lerouge> References: <20180111163204.GE6176@hirez.programming.kicks-ass.net> <1515734588.10188.36.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515734588.10188.36.camel@gmx.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 06:23:08AM +0100, Mike Galbraith wrote: > 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. Workqueue are probably more simple. Unless you need to set specific prios to your ksoftirqds? Not sure if that's tunable on workqueues.