From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbeAJVsF (ORCPT + 1 other); Wed, 10 Jan 2018 16:48:05 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37906 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbeAJVsD (ORCPT ); Wed, 10 Jan 2018 16:48:03 -0500 X-Google-Smtp-Source: ACJfBosBhnYw3GuRlJLxV62+S52gJhnMbw2UFjleP7XP0cpeIBbPMdxWofufjvO2HtoeKOppe2YVKA== Message-ID: <1515620880.3350.44.camel@arista.com> Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context From: Dmitry Safonov To: Eric Dumazet Cc: LKML , 0x7f454c46@gmail.com, Andrew Morton , David Miller , Frederic Weisbecker , Hannes Frederic Sowa , Ingo Molnar , "Levin, Alexander (Sasha Levin)" , Linus Torvalds , Paolo Abeni , "Paul E. McKenney" , Peter Zijlstra , Radu Rendec , Rik van Riel , Stanislaw Gruszka , Thomas Gleixner , Wanpeng Li Date: Wed, 10 Jan 2018 21:48:00 +0000 In-Reply-To: References: <20180109133623.10711-1-dima@arista.com> <20180109133623.10711-2-dima@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 Tue, 2018-01-09 at 10:02 -0800, Eric Dumazet wrote: > On Tue, Jan 9, 2018 at 5:36 AM, Dmitry Safonov > wrote: > > Warning: Not merge-ready > > > > I. Current workflow of ksoftirqd. > > Softirqs are processed in the context of ksoftirqd iff they are > > being raised very frequently. How it works: > > do_softirq() and invoke_softirq() deffer pending softirq iff > > > > ... > > > > > Note, that I tested in VMs and I've found that if I produce more > > hw irqs on the host, than the results for master are not that > > dramatically bad, but still much worse then with RFC. > > By that reason I have qualms if my test's results are correct. > > Note that deferring all NET RX/TX to ksoftirqd is going to > dramatically hurt tail latencies. > > You really should test with RPC like workloads (netperf -t TCP_RR) > and > hundred of threads per cpu :/ Yeah, thanks for the reply, will give that a shot. > > It seems we are going to revert/adapt 4cd13c21b2 , not defer more > stuff to ksoftirqd. Hmm, what if we use some other logic for deferring/non-deferring like checking how many softirqs where serviced during process's timeslice and decide if proceed with __do_softirq() or defer it not to starve a task? Might that make sense? -- Thanks, Dmitry