public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>,
	William Lee Irwin III <wli@holomorphy.com>,
	Paolo Ciarrocchi <ciarrocchi@linuxmail.org>,
	linux-kernel@vger.kernel.org
Subject: Re: LMbench2.0 results
Date: Sun, 08 Sep 2002 11:40:08 -0700	[thread overview]
Message-ID: <3D7B9988.6B8CD04F@digeo.com> (raw)
In-Reply-To: 1031504848.26888.238.camel@irongate.swansea.linux.org.uk

Alan Cox wrote:
> 
> On Sun, 2002-09-08 at 00:44, Martin J. Bligh wrote:
> > >> Perhaps testing with overcommit on would be useful.
> > >
> > > Well yes - the new overcommit code was a significant hit on the 16ways
> > > was it not?  You have some numbers on that?
> >
> > About 20% hit on system time for kernel compiles.
> 
> That suprises me a lot. On a 2 way and 4 way the 2.4 memory overcommit
> check code didnt show up. That may be down to the 2 way being on a CPU
> that has no measurable cost for locked operations and the 4 way being an
> ancient ppro a friend has.
> 
> If it is the memory overcommit handling then there are plenty of ways to
> deal with it efficiently in the non-preempt case at least. I had
> wondered originally about booking chunks of pages off per CPU (take the
> remaining overcommit divide by four and only when a CPU finds its
> private block is empty take a lock and redistribute the remaining
> allocation). Since boxes almost never get that close to overcommit
> kicking in then it should mean we close to never touch a locked count.

Martin had this profile for a kernel build on 2.5.31-mm1:



c01299d0 6761     1.28814     vm_enough_memory
c0114584 8085     1.5404      load_balance
c01334c0 8292     1.57984     __free_pages_ok
c011193c 11559    2.20228     smp_apic_timer_interrupt
c0113040 12075    2.3006      do_page_fault
c012bf08 12075    2.3006      find_get_page
c0114954 12912    2.46007     scheduler_tick
c012c430 13199    2.51475     file_read_actor
c01727e8 20440    3.89434     __generic_copy_from_user
c0133fb8 25792    4.91403     nr_free_pages
c01337c0 27318    5.20478     rmqueue
c0129588 36955    7.04087     handle_mm_fault
c013a65c 38391    7.31447     page_remove_rmap
c0134094 43755    8.33645     get_page_state
c0105300 57699    10.9931     default_idle
c0128e64 58735    11.1905     do_anonymous_page

We can make nr_free_pages go away by adding global free page 
accounting to struct page_states.  So we're accounting it in
two places, but it'll be simple.

The global page accounting is very much optimised for the fast path at
the expense of get_page_state().  (And that kernel didn't have the
rmap speedups).

We need to find some way of making vm_enough_memory not call get_page_state
so often.  One way of doing that might be to make get_page_state dump
its latest result into a global copy, and make vm_enough_memory()
only get_page_state once per N invokations.  A speed/accuracy tradeoff there.

  parent reply	other threads:[~2002-09-08 18:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-07 12:18 LMbench2.0 results Paolo Ciarrocchi
2002-09-07 12:27 ` Jeff Garzik
2002-09-07 18:53   ` Rik van Riel
2002-09-07 21:44     ` Alan Cox
2002-09-13 22:46       ` Pavel Machek
2002-09-07 14:33 ` James Morris
2002-09-09 22:22   ` Cliff White
2002-09-07 16:20 ` Andrew Morton
2002-09-07 20:03   ` William Lee Irwin III
2002-09-07 23:12     ` Andrew Morton
2002-09-07 23:01       ` William Lee Irwin III
2002-09-07 23:44       ` Martin J. Bligh
2002-09-08 17:07         ` Alan Cox
2002-09-08 18:11           ` Martin J. Bligh
2002-09-08 18:40           ` Andrew Morton [this message]
2002-09-08 20:48             ` Hugh Dickins
2002-09-08 21:51               ` Andrew Morton
2002-09-09 21:13             ` Alan Cox
2002-09-09 21:44               ` Andrew Morton
2002-09-09 22:09                 ` Alan Cox
2002-09-08  7:51     ` Andrew Morton
2002-09-08  7:37       ` David S. Miller
2002-09-08  8:28         ` William Lee Irwin III
2002-09-08  8:25           ` David S. Miller
2002-09-08  9:12             ` William Lee Irwin III
2002-09-08 20:02   ` Daniel Phillips
2002-09-09 13:37     ` Rik van Riel
2002-09-09 16:16       ` Daniel Phillips
2002-09-09 16:26         ` Martin J. Bligh
2002-09-09 16:55           ` Daniel Phillips
2002-09-09 17:24             ` Martin J. Bligh
2002-09-09 21:11             ` Alan Cox
2002-09-09 16:52         ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2002-09-07 12:40 Paolo Ciarrocchi
2002-09-07 14:09 Shane Shrybman
2002-09-07 18:04 Paolo Ciarrocchi
2002-09-13 22:49 ` Pavel Machek
2002-09-07 18:09 Paolo Ciarrocchi
2002-09-08  7:51 ` Andrew Morton
2002-09-14 18:26 Paolo Ciarrocchi
2002-09-15 18:08 ` Pavel Machek
2002-09-22 12:42 Paolo Ciarrocchi

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=3D7B9988.6B8CD04F@digeo.com \
    --to=akpm@digeo.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ciarrocchi@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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