From: Eric Dumazet <dada1@cosmosbay.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
John Rociak <john.ronciak@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [PATCH 11/11] ixgb: Add prefetch
Date: Sat, 22 Apr 2006 07:34:41 +0200 [thread overview]
Message-ID: <4449C071.5000107@cosmosbay.com> (raw)
In-Reply-To: <20060422010055.24255.71946.stgit@jk-desktop.jf.intel.com>
Jeff Kirsher a écrit :
> - This patch is to improve performance by adding prefetch to the ixgb driver
> - Add driver comments
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: John Ronciak <john.ronciak@intel.com>
> ---
>
> drivers/net/ixgb/ixgb_main.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
> index 26cb0d5..98303cb 100644
> --- a/drivers/net/ixgb/ixgb_main.c
> +++ b/drivers/net/ixgb/ixgb_main.c
> @@ -29,6 +29,13 @@
> #include "ixgb.h"
>
> /* Change Log
> + * 1.0.104 10-Jan-2006
> + * - fix for copybreak/recycle
> + * 1.0.103 Oct-3
> + * - suck in some e1000 changes, including copybreak and LLTX
> + * - support for CX4 adapters
> + * 1.0.102 June-20-2005
> + * - add a workaround for a hardware issue when using TSO
> * 1.0.96 04/19/05
> * - Make needlessly global code static -- bunk@stusta.de
> * - ethtool cleanup -- shemminger@osdl.org
> @@ -1916,7 +1923,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a
> skb = buffer_info->skb;
> buffer_info->skb = NULL;
>
> - prefetch(skb->data);
> + prefetch(skb->data - NET_IP_ALIGN);
I doubt this change is usefull.
skb->data and dkb->dta - NET_IP_ALIGN are on the same cache line.
So prefetch(skb->data) is cheaper for he compiler and has the same effect on
the memory prefetch that is eventually done by the cpu.
>
> if(++i == rx_ring->count) i = 0;
> next_rxd = IXGB_RX_DESC(*rx_ring, i);
> @@ -1929,6 +1936,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a
> next_buffer = &rx_ring->buffer_info[i];
> next_skb = next_buffer->skb;
> prefetch(next_skb);
> + prefetch(next_skb->data - NET_IP_ALIGN);
I doubt that next->skb_data is available for free just after a
prefetch(next_skb). This second prefetch has a hidden cost : The memory
location (&next_skb->data) must be in L1 cache. So basically the
prefetch(next_skb) is useless...
prefetch are not magic things. They have a cost (they increase the code size),
and should be used carefully.
Eric
next prev parent reply other threads:[~2006-04-22 19:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-22 1:00 [PATCH 00/11] ixgb: driver update (upstream) Jeff Kirsher
2006-04-22 1:00 ` [PATCH 01/11] ixgb: Fix compilation errors by initializing variables Jeff Kirsher
2006-04-22 8:49 ` Francois Romieu
2006-04-22 1:00 ` [PATCH 02/11] ixgb: Fix the use of dprintk rather than printk Jeff Kirsher
2006-04-22 9:03 ` Francois Romieu
2006-04-24 17:24 ` Stephen Hemminger
2006-05-19 18:35 ` Auke Kok
2006-04-22 1:00 ` [PATCH 03/11] ixgb: Fix hard coded numbers Jeff Kirsher
2006-04-22 9:17 ` Francois Romieu
2006-04-22 1:00 ` [PATCH 04/11] ixgb: Fix duplicate code Jeff Kirsher
2006-04-22 1:00 ` [PATCH 05/11] ixgb: Fix timeout code Jeff Kirsher
2006-04-22 1:00 ` [PATCH 06/11] ixgb: Fix TSO Jeff Kirsher
2006-04-22 1:00 ` [PATCH 07/11] ixgb: Fixed flow control parameters Jeff Kirsher
2006-04-22 1:00 ` [PATCH 08/11] ixgb: Add support for copper 10GbE Jeff Kirsher
2006-04-22 1:00 ` [PATCH 09/11] ixgb: Add performance enhancements to the buffer_info struct Jeff Kirsher
2006-04-22 1:00 ` [PATCH 10/11] ixgb: clean up whitespace Jeff Kirsher
2006-04-22 1:00 ` [PATCH 11/11] ixgb: Add prefetch Jeff Kirsher
2006-04-22 5:34 ` Eric Dumazet [this message]
2006-04-26 10:22 ` [PATCH 00/11] ixgb: driver update (upstream) Jeff Garzik
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=4449C071.5000107@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=john.ronciak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.