linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: netdev@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] avoid atomic op on page free
Date: Mon, 06 Mar 2006 17:21:43 -0800	[thread overview]
Message-ID: <440CE027.5090207@hp.com> (raw)
In-Reply-To: <20060306165039.1c3b66d8.akpm@osdl.org>

Andrew Morton wrote:
> Benjamin LaHaise <bcrl@linux.intel.com> wrote:
> 
>>Hello Andrew et al,
>>
>>The patch below adds a fast path that avoids the atomic dec and test 
>>operation and spinlock acquire/release on page free.  This is especially 
>>important to the network stack which uses put_page() to free user 
>>buffers.  Removing these atomic ops helps improve netperf on the P4 
>>from ~8126Mbit/s to ~8199Mbit/s (although that number fluctuates quite a 
>>bit with some runs getting 8243Mbit/s).  There are probably better 
>>workloads to see an improvement from this on, but removing 3 atomics and 
>>an irq save/restore is good.
>>
 > ...
> Because userspace has to do peculiar things to get its pages taken off the
> LRU.  What exactly was that application doing?
> 
> The patch adds slight overhead to the common case while providing
> improvement to what I suspect is a very uncommon case?

A netperf TCP_STREAM test sits in a tight loop calling send() on the 
side running netperf and recv() on the side running netserver.  By 
default it accepts the default socket buffer sizes, and uses what is 
returned by a getsockopt(SO_SNDBUF) _before_ connect() as its "send 
size"  (and SO_RCVBUF as the default recv size)

So, in that regard it will be akin to a unidirectional bulk transfer 
application - eg ftp.

Netperf TCP_STREAM will send from a "ring" of buffers allocated at one 
time via malloc that in number are one more than SO_SNDBUF/sendsize.

There is also the TCP_SENDFILE test that is similar to TCP_STREAM only 
the netperf side calls sendfile(); and a TCP_RR test that will by 
default exchange single-byte requests and responses - single 
"transaction" outstanding at a time.  The idea was to test path length 
without taxing link bandwidth.

There are commandline options to change all of that, and several other 
tests, some optional compilations:

http://www.netperf.org/svn/netperf2/trunk/doc/

will have most if not all the nitty gritty details.  Some of the more 
recent additions to netperf are only described in the netperf-talk 
mailing list:

http://www.netperf.org/pipermail/netperf-talk/

eg support for more than one transaction outstanding in an _RR test and 
other odds and ends.

rick jones

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2006-03-07  1:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07  0:10 Benjamin LaHaise
2006-03-07  0:50 ` Andrew Morton
2006-03-07  1:11   ` Benjamin LaHaise
2006-03-07  1:39     ` Andrew Morton
2006-03-07  1:52       ` Benjamin LaHaise
2006-03-07  6:30         ` Andi Kleen
2006-03-07  2:04     ` Nick Piggin
2006-03-07  2:10       ` Benjamin LaHaise
2006-03-07  4:08         ` Nick Piggin
2006-03-07  2:30       ` Chen, Kenneth W
2006-03-07  4:13         ` Nick Piggin
2006-03-07  1:21   ` Rick Jones [this message]
2006-03-07  1:53 ` Nick Piggin
2006-03-07  1:58   ` Benjamin LaHaise
2006-03-07  2:14     ` Nick Piggin

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=440CE027.5090207@hp.com \
    --to=rick.jones2@hp.com \
    --cc=linux-mm@kvack.org \
    --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