From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com
Subject: Re: [net-next 11/13] igb: Make Tx budget for NAPI user adjustable
Date: Mon, 19 Sep 2011 09:32:18 -0700 [thread overview]
Message-ID: <4E776E92.6090303@intel.com> (raw)
In-Reply-To: <1316448352.2764.27.camel@bwh-desktop>
On 09/19/2011 09:05 AM, Ben Hutchings wrote:
> On Mon, 2011-09-19 at 08:48 -0700, Alexander Duyck wrote:
>> On 09/17/2011 10:04 AM, Ben Hutchings wrote:
>>> On Sat, 2011-09-17 at 01:04 -0700, Jeff Kirsher wrote:
>>>> From: Alexander Duyck<alexander.h.duyck@intel.com>
>>>>
>>>> This change is meant to make the NAPI budget limits for transmit
>>>> adjustable. By doing this it is possible to tune the value for optimal
>>>> performance with applications such as routing.
>>> [...]
>>>> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
>>>> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>>>> @@ -1989,6 +1989,9 @@ static int igb_set_coalesce(struct net_device *netdev,
>>>> if ((adapter->flags& IGB_FLAG_QUEUE_PAIRS)&& ec->tx_coalesce_usecs)
>>>> return -EINVAL;
>>>>
>>>> + if (ec->tx_max_coalesced_frames_irq)
>>>> + adapter->tx_work_limit = ec->tx_max_coalesced_frames_irq;
>>>> +
>>> [...]
>>>
>>> I don't think it really makes sense to conflate NAPI and interrupt
>>> moderation parameters. This really ought to be added to NAPI itself.
>>>
>>> (NAPI contexts really ought to be exposed through sysfs somehow. I
>>> think we've discussed this before, and it's tricky due to the lack of a
>>> consistent mapping between those contexts and net devices.)
>>>
>>> Ben.
>> All NAPI does is move things from a hard interrupt to a soft interrupt
>> in the case of TX cleanup. If it wasn't for NAPI we would be calling
>> ixgbe_clean_tx_irq directly from the interrupt handler and would still
>> be using the same limiting value. This is why placing it here makes sense.
> But tx_max_coalesced_frames_irq is not supposed to be a work limit (and
> such a work limit doesn't seem useful in the absence of NAPI). As I
> understand it, it is supposed to be an alternate moderation value for
> the hardware to use if a frame is sent while the IRQ handler is running.
>
> Ben.
The fact is ixgbe has been using this parameter this way for over 2
years now and the main goal of this patch was just to synchronize how
things work on igb and ixgbe.
Our hardware doesn't have a mechanism for firing an interrupt after X
number of frames so instead we simply have modified things so that we
will only process X number of frames and then fire another
interrupt/poll if needed. As such we aren't that far out of compliance
with the meaning of how this parameter is supposed to be used.
Thanks,
Alex
next prev parent reply other threads:[~2011-09-19 16:31 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-17 8:04 [net-next 00/13][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2011-09-17 8:04 ` [net-next 01/13] ixgb: eliminate checkstack warnings Jeff Kirsher
2011-09-17 8:43 ` Joe Perches
2011-09-19 21:36 ` Jesse Brandeburg
2011-09-19 22:28 ` [PATCH] intel: Convert <FOO>_LENGTH_OF_ADDRESS to ETH_ALEN Joe Perches
2011-09-19 23:33 ` Jeff Kirsher
2011-09-17 8:04 ` [net-next 02/13] igb: Update RXDCTL/TXDCTL configurations Jeff Kirsher
2011-09-17 8:04 ` [net-next 03/13] igb: Update max_frame_size to account for an optional VLAN tag if present Jeff Kirsher
2011-09-17 8:04 ` [net-next 04/13] igb: drop support for single buffer mode Jeff Kirsher
2011-09-17 8:04 ` [net-next 05/13] igb: streamline Rx buffer allocation and cleanup Jeff Kirsher
2011-09-17 8:04 ` [net-next 06/13] igb: update ring and adapter structure to improve performance Jeff Kirsher
2011-09-17 8:04 ` [net-next 07/13] igb: Refactor clean_rx_irq to reduce overhead and " Jeff Kirsher
2011-09-17 8:04 ` [net-next 08/13] igb: drop the "adv" off function names relating to descriptors Jeff Kirsher
2011-09-17 8:04 ` [net-next 09/13] igb: Replace E1000_XX_DESC_ADV with IGB_XX_DESC Jeff Kirsher
2011-09-17 8:04 ` [net-next 10/13] igb: Remove multi_tx_table and simplify igb_xmit_frame Jeff Kirsher
2011-09-17 8:04 ` [net-next 11/13] igb: Make Tx budget for NAPI user adjustable Jeff Kirsher
2011-09-17 17:04 ` Ben Hutchings
2011-09-19 15:48 ` Alexander Duyck
2011-09-19 16:05 ` Ben Hutchings
2011-09-19 16:32 ` Alexander Duyck [this message]
2011-09-19 21:00 ` David Miller
2011-09-19 22:27 ` Alexander Duyck
2011-09-19 23:36 ` Jeff Kirsher
2011-09-19 23:42 ` Stephen Hemminger
2011-09-19 23:47 ` David Miller
2011-09-20 0:10 ` Ben Hutchings
2011-09-20 18:59 ` Andy Gospodarek
2011-09-20 20:23 ` Neil Horman
2011-09-27 23:45 ` Ben Hutchings
2011-09-28 11:00 ` Neil Horman
2011-09-28 15:11 ` Stephen Hemminger
2011-09-28 17:07 ` Neil Horman
2011-09-19 20:56 ` David Miller
2011-09-19 20:57 ` David Miller
2011-09-17 8:04 ` [net-next 12/13] igb: split buffer_info into tx_buffer_info and rx_buffer_info Jeff Kirsher
2011-09-17 8:04 ` [net-next 13/13] igb: Consolidate creation of Tx context descriptors into a single function Jeff Kirsher
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=4E776E92.6090303@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.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).