netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexander.duyck@gmail.com
Cc: aduyck@mirantis.com, netdev@vger.kernel.org
Subject: Re: [PATCH] netpoll: Drop budget parameter from NAPI polling call hierarchy
Date: Tue, 29 Sep 2015 13:48:46 -0700 (PDT)	[thread overview]
Message-ID: <20150929.134846.1031290048722134936.davem@davemloft.net> (raw)
In-Reply-To: <560874B0.1080903@gmail.com>

From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Sun, 27 Sep 2015 15:58:56 -0700

> On 09/26/2015 10:36 PM, David Miller wrote:
>> From: Alexander Duyck <aduyck@mirantis.com>
>> Date: Tue, 22 Sep 2015 14:56:08 -0700
>>
>>> Rather than carry around a value of budget that is 0 or less we can
>>> instead
>>> just loop through and pass 0 to each napi->poll call.  If any driver
>>> returns a value for work done that is non-zero then we can report that
>>> driver and continue rather than allowing a bad actor to make the
>>> budget
>>> value negative and pass that negative value to napi->poll.
>> Unfortunately we have drivers that won't do any TX work if the budget
>> is zero.
> 
> Well that is what we are doing right now.  The fact is the call starts
> out with a budget of 0, and it is somewhat hidden from the call since
> the budget is assigned a value of 0 in netpoll_poll_dev. That is one
> of the things I was wanting do address because that is clear as mud
> from looking at poll_one_napi.  Based on the code you would assume
> budget starts out as a non-zero value and it doesn't.

I see, thanks for explaining.

      reply	other threads:[~2015-09-29 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 21:56 [PATCH] netpoll: Drop budget parameter from NAPI polling call hierarchy Alexander Duyck
2015-09-27  5:36 ` David Miller
2015-09-27 22:58   ` Alexander Duyck
2015-09-29 20:48     ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150929.134846.1031290048722134936.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).