All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Yuhong Bao <yuhongbao_386@hotmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: Ubuntu 32-bit, 32-bit PAE, 64-bit Kernel Benchmarks
Date: Thu, 31 Dec 2009 10:39:41 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0912311019580.11961@localhost.localdomain> (raw)
In-Reply-To: <SNT125-W41CEF6892DBE0B1FD99B4AC3780@phx.gbl>



On Wed, 30 Dec 2009, Yuhong Bao wrote:
> 
> Given that Linus was once talking about the performance penalties of PAE 
> and HIGHMEM64G, perhaps you'd find these benchmarks done by Phoronix of 
> interest:
>   http://www.phoronix.com/scan.php?page=article&item=ubuntu_32_pae

PAE has no negative impact on user-land loads (aside from a potentially 
really _tiny_ effect from just bigger page tables), and obviously means 
that you actually have more RAM available, so it can be a big win.

The "25% cost" is purely kernel-side work when the kernel needs to 
kmap/kunmap - which it only needs to do when it touches highmem pages 
itself directly. Which is pretty rare - but when it happens a lot, it's 
extremely expensive.

The worst load I've ever seen (which was the 25%+ case) needed btrfs 
and heavy meta-data workloads (ie things like file creates/deletes, or 
uncached lookups), because btrfs puts all its radix trees in highmem pages 
and thus needs to kmap/kunmap them all. So that's one way to see heavy 
kmap/kunmap loads.

(In the meantime, I complained to the btrfs people about the CPU hogging 
behavior, and afaik btrfs has improved since I did my kernel profiles of 
the benchmarks, but I haven't re-done them)

Theres' a potential secondary issue: my test-bed for that btrfs setup was 
a netbook using Intel Atom. The performance profile of an Atom chip is 
pretty different from any of the better out-of-order CPU's.

Extra instructions cost a lot more. For example, out-of-order is 
particularly good at handling "nonsense" instructions that aren't on a 
critical path and aren't important for actual semantics - things like the 
stack frame modifications etc are often almost "free" on out-of-order 
CPU's because they only tend to have trivial dependencies that can be 
worked around with things like the "stack engine" etc. So I seem to 
remember that the "omit stack frame" option was a much bigger deal on Atom 
than on a Core 2 Duo CPU, for example.

So it's entirely possible that the TLB flushing (and eventual misses, of 
course) involved with kmap()/kunmap() is much more expensive on Atom than 
it is on a Core2 system. So it's possible that my 25% cost thing was for 
pretty much a pessimal situation, due to a combination of heavy kernel 
loads (I used "git status" as one of the btrfs/atom benchmarks - pretty 
much _all_ it does is pathname lookups and readdir) with btrfs and atom.

		Linus

  parent reply	other threads:[~2009-12-31 18:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-31  1:29 Ubuntu 32-bit, 32-bit PAE, 64-bit Kernel Benchmarks Yuhong Bao
2009-12-31  2:49 ` Bill Davidsen
2009-12-31  8:21   ` Boaz Harrosh
2009-12-31 16:32     ` Bill Davidsen
2009-12-31 17:49       ` Pedro Ribeiro
2009-12-31 18:39 ` Linus Torvalds [this message]
2010-01-03  3:39   ` Yuhong Bao
2010-01-16  0:48   ` Yuhong Bao
2010-01-16  1:49 ` H. Peter Anvin
2010-01-16  2:06   ` Yuhong Bao
2010-01-16  3:47     ` Linus Torvalds
2010-01-16  4:32       ` yuhongbao_386
2010-01-16  4:53     ` H. Peter Anvin
2010-01-16  6:17       ` yuhongbao_386
2010-01-16 17:59       ` Bill Davidsen
2010-01-17  9:26         ` matthieu castet
2010-01-31 17:03       ` Robert Hancock
2010-01-16 12:33   ` Sitsofe Wheeler
2010-01-16 12:57     ` Robert P. J. Day
2010-01-16 17:11       ` H. Peter Anvin
2010-03-01  1:31   ` Yuhong Bao
2010-03-01  1:38   ` Yuhong Bao
2010-01-16  8:46 ` Geert Uytterhoeven

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=alpine.LFD.2.00.0912311019580.11961@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=yuhongbao_386@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.