netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Arthur Kepner <akepner@sgi.com>
Cc: Leonid Grossman <leonid.grossman@neterion.com>,
	muhammad.shafiq@neterion.com, ramkrishna.vepa@neterion.com,
	netdev@oss.sgi.com
Subject: Re: [PATCH] s2io: replace readq() with mmiowb() in s2io_xmit()
Date: Tue, 3 May 2005 11:40:34 +1000	[thread overview]
Message-ID: <20050503014034.GC12682@krispykreme> (raw)
In-Reply-To: <Pine.LNX.4.61.0505021459240.16692@linux.site>

 
Hi,

> The neterion 10gige driver uses a readq() to flush some PIO writes
> in s2io_xmit(). Using mmiowb() can, in some cases, reduce CPU 
> utilization, and/or allow higher throughput. This is particularly 
> true when TSO is off, and small MTUs are in use. 
> 
> For example, in one test measurement I just did with 2.6.12-rc2
> on an Altix, MTUs were set to 1500 bytes and TSO turned off. 
> With this patch, transmit throughput improved by ~20%. Throughput 
> was ultimately bound by the CPU with or without the patch. With 
> large MTUs (9600 bytes) or with TSO turned on, there was no 
> significant change to throughput or CPU utilization.

I didnt know mmiowb is supposed to be a replacement for PCI write
posting. Most architectures define mmiowb as nothing and so will be
broken with your change.

Anton

> --- linux.orig/drivers/net/s2io.c	2005-05-02 16:40:17.469733509 -0700
> +++ linux/drivers/net/s2io.c	2005-05-02 16:40:25.001043632 -0700
> @@ -2759,8 +2759,8 @@ static int s2io_xmit(struct sk_buff *skb
>  #endif
>  	writeq(val64, &tx_fifo->List_Control);
>  
> -	/* Perform a PCI read to flush previous writes */
> -	val64 = readq(&bar0->general_int_status);
> +	/* Perform a mmiowb() to order previous writes */
> +	mmiowb();
>  
>  	put_off++;
>  	put_off %= mac_control->tx_curr_put_info[queue].fifo_len + 1;
> 
> --
> Arthur
> 

  reply	other threads:[~2005-05-03  1:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200504051836.j35IanDD005402@guinness.s2io.com>
2005-05-03  1:09 ` [PATCH] s2io: replace readq() with mmiowb() in s2io_xmit() Arthur Kepner
2005-05-03  1:40   ` Anton Blanchard [this message]
2005-05-03  2:11     ` Arthur Kepner
2005-05-03  2:58       ` Ramkrishna Vepa
2005-05-03  3:06         ` Anton Blanchard
2005-05-03 14:52           ` Arthur Kepner
2005-05-03 16:23             ` Ramkrishna Vepa
2005-05-03  3:05       ` Anton Blanchard

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=20050503014034.GC12682@krispykreme \
    --to=anton@samba.org \
    --cc=akepner@sgi.com \
    --cc=leonid.grossman@neterion.com \
    --cc=muhammad.shafiq@neterion.com \
    --cc=netdev@oss.sgi.com \
    --cc=ramkrishna.vepa@neterion.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).