linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: smal.root@gmail.com
Cc: linux-mm@kvack.org, bugme-daemon@bugzilla.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Bugme-new] [Bug 11156] New: Old kernels copy memory faster than new
Date: Mon, 28 Jul 2008 18:13:06 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0807281740580.12931@blonde.site> (raw)
In-Reply-To: <20080724122642.b8ef2ac6.akpm@linux-foundation.org>

On Thu, 24 Jul 2008, Andrew Morton wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=11156
> > 
> > Kernel - 2.6.25.4(own built)
> > Copy speed - 1.7GByte/s
> > 
> > Kernel - 2.6.23.5(own built)
> > Copy speed - 43.5GByte/s
> > 
> > Steps to reproduce:
> > dd if=/dev/zero of=/dev/null bs=16M count=10000
> 
> lol.  OK, who did that?
> 
> Perhaps ZERO_PAGE changes?

Yes, the ZERO_PAGE changes: readprofile clearly shows lots of time
in clear_user() on 2.6.24 onwards, clearing each page instead of
using the ZERO_PAGE.

I see Nick has already answered this, and the bug is now closed
(guess he's on 2.6.23 whereas I'm on later ;).  I agree with him,
copying from /dev/zero to /dev/null is not an operation which
deserves VM tricks to optimize; but I wanted to add one point.

The particular awfulness of those dd rates (on machines I've
tried I see new kernels as 10 to 30 times worse than old kernels
at that test) owes a lot to the large blocksize (16M) being used.

That blocksize will not fit in the processor's memory cache, so
repeatedly clearing the pages is very slow.  Bring the blocksize
down to something that easily fits in the L2 cache, perhaps 1M or
256k, and new kernels then appear only twice(ish) as bad as old.

Nothing to be proud of, but not nearly so bad as the bs=16M case.

Hugh

--
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:[~2008-07-28 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-11156-10286@http.bugzilla.kernel.org/>
2008-07-24 19:26 ` Andrew Morton
2008-07-28 17:13   ` Hugh Dickins [this message]

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=Pine.LNX.4.64.0807281740580.12931@blonde.site \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=smal.root@gmail.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