From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755772AbcB2P23 (ORCPT ); Mon, 29 Feb 2016 10:28:29 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34816 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbcB2P20 (ORCPT ); Mon, 29 Feb 2016 10:28:26 -0500 Message-ID: <1456759643.648.65.camel@edumazet-ThinkPad-T530> Subject: Re: Softirq priority inversion from "softirq: reduce latencies" From: Eric Dumazet To: Peter Hurley Cc: Mike Galbraith , Francois Romieu , Eric Dumazet , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg KH , dmaengine@vger.kernel.org, John Ogness , Sebastian Andrzej Siewior , Andrew Morton , Thomas Gleixner Date: Mon, 29 Feb 2016 07:27:23 -0800 In-Reply-To: <56D45DAF.5070709@hurleysoftware.com> References: <56D1E8B6.6090003@hurleysoftware.com> <1456638957.3676.12.camel@gmail.com> <20160228170109.GA16322@electric-eye.fr.zoreil.com> <1456721889.3488.67.camel@gmail.com> <56D45DAF.5070709@hurleysoftware.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 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 On lun., 2016-02-29 at 07:03 -0800, Peter Hurley wrote: > The reason why Eric's change is so effective for Eric's workload is > that it fixes the problem where NET_RX keeps getting new network packets > so it keeps looping, servicing more NET_RX softirq. You have very little idea of what is happening in networking land. Once hard irq for RX has triggered, we arm a NAPI (NET_RX softirq), and no more irq will come unless the napi handler ran. Then when NAPI is complete, we re-allow interrupt to be delivered when a new packet is coming. Yes, ksoftirqd runs under load, and this is _wanted_. Sure, it might add a latency if some high prio task is wanting the same cpu, but this is exactly the purpose of having multi tasking.