linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@linux.intel.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-mm@kvack.org, netdev@vger.kernel.org
Subject: Re: [PATCH] avoid atomic op on page free
Date: Mon, 6 Mar 2006 18:10:02 -0800	[thread overview]
Message-ID: <20060307021002.GL32565@linux.intel.com> (raw)
In-Reply-To: <440CEA34.1090205@yahoo.com.au>

On Tue, Mar 07, 2006 at 01:04:36PM +1100, Nick Piggin wrote:
> I'd say it will turn out to be more trouble than its worth, for the 
> miserly cost
> avoiding one atomic_inc, and one atomic_dec_and_test on page-local data 
> that will
> be in L1 cache. I'd never turn my nose up at anyone just having a go 
> though :)

The cost is anything but miserly.  Consider that every lock instruction is 
a memory barrier which takes your OoO CPU with lots of instructions in flight 
to ramp down to just 1 for the time it takes that instruction to execute.  
That synchronization is what makes the atomic expensive.

In the case of netperf, I ended up with a 2.5Gbit/s (~30%) performance 
improvement through nothing but microoptimizations.  There is method to 
my madness. ;-)

		-ben

--
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>

  reply	other threads:[~2006-03-07  2:10 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 [this message]
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
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=20060307021002.GL32565@linux.intel.com \
    --to=bcrl@linux.intel.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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