From: David Miller <davem@davemloft.net>
To: rmody@brocade.com
Cc: netdev@vger.kernel.org, adapter_linux_open_src_team@brocade.com,
gkaraje@brocade.com
Subject: Re: [net-next,v4 04/12] bna: TX Path and RX Path Changes
Date: Tue, 23 Aug 2011 16:24:37 -0700 (PDT) [thread overview]
Message-ID: <20110823.162437.410987029144199561.davem@davemloft.net> (raw)
In-Reply-To: <20110823.162220.1108826596231524649.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Tue, 23 Aug 2011 16:22:20 -0700 (PDT)
> From: Rasesh Mody <rmody@brocade.com>
> Date: Tue, 23 Aug 2011 10:56:00 -0700
>
>> + BNA_QE_INDX_ADD(_index, 1, _depth); \
>> + for (j = 0; j < (_frag); j++) { \
>> + prefetch(&(_array)[(_index) + 1]); \
>> + dma_unmap_page(_pdev, dma_unmap_addr(&(_array)[_index], \
>
> This prefetch is excessive and a waste of cpu cycles.
>
> You're going to prefetch a full 64-byte (or even 128-byte) cache line
> for every 16-byte blob (at best) you iterate over. This means you'll
> prefetch the same cache line, needlessly, over and over again.
Also this whole idea to macroize this operation is bad.
Use a real seperate C function if you want to avoid code duplicaiton.
Don't mark it inline, let the compiler take care of that.
Otherwise you're sacrificing type safety and risking the usual problems
created by macros (multiple variable evaluation etc.).
next prev parent reply other threads:[~2011-08-23 23:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 17:55 [net-next,v4 00/12] bna: Update bna driver version to 3.0.2.1 Rasesh Mody
2011-08-23 17:55 ` [net-next,v4 01/12] bna: Naming Change and Minor Macro Fix Rasesh Mody
2011-08-23 17:55 ` [net-next,v4 02/12] bna: PCI Probe Fix Rasesh Mody
2011-08-23 17:55 ` [net-next,v4 03/12] bna: Interrupt Polling and NAPI Init Changes Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 04/12] bna: TX Path and RX Path Changes Rasesh Mody
2011-08-23 23:22 ` David Miller
2011-08-23 23:24 ` David Miller [this message]
2011-08-23 17:56 ` [net-next,v4 05/12] bna: Formatting and Code Cleanup Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 06/12] bna: Initialization and Locking Fix Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 07/12] bna: Ethtool Enhancements and Fix Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 08/12] bna: Async Mode Tx Rx Init Fix Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 09/12] bna: MBOX IRQ Flag Check after Locking Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 10/12] bna: Queue Depth and SKB Unmap Array Fix Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 11/12] bna: SKB PCI UNMAP Fix Rasesh Mody
2011-08-23 17:56 ` [net-next,v4 12/12] bna: Driver Version changed to 3.0.2.1 Rasesh Mody
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=20110823.162437.410987029144199561.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=adapter_linux_open_src_team@brocade.com \
--cc=gkaraje@brocade.com \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.com \
/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).