From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH v2 net] r8169: fix NAPI handling under high load Date: Thu, 18 Oct 2018 18:51:56 -0700 Message-ID: References: <8d75498e-6f43-a699-3a0a-fb4a2b5dc860@gmail.com> <05eb4233-bf98-4aeb-73f6-94fec46ca3de@gmail.com> <20181018225900.GA16653@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Heiner Kallweit , David Miller , Realtek linux nic maintainers , "netdev@vger.kernel.org" To: Francois Romieu Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:42406 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbeJSJzt (ORCPT ); Fri, 19 Oct 2018 05:55:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id i4-v6so15035867pgq.9 for ; Thu, 18 Oct 2018 18:51:58 -0700 (PDT) In-Reply-To: <20181018225900.GA16653@electric-eye.fr.zoreil.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/18/2018 03:59 PM, Francois Romieu wrote: > Eric Dumazet : > [...] >> One has to wonder why rtl8169_poll(), which might be called in a loop under DOS, >> has to call rtl_ack_events() ? > > So as to cover a wider temporal range before any event can trigger an > extra irq. I was more worried about irq cost than about IO cost (and > I still am). > Normally the IRQ would not be enabled under DOS. Only when a poll would receive less packets than the budget the following would normally allow the device to send another IRQ if (work_done < budget) { napi_complete_done(napi, work_done); rtl_irq_enable(tp, enable_mask); mmiowb(); }