public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: torvalds@transmeta.com
Cc: davidm@hpl.hp.com, davidm@napali.hpl.hp.com, gh@us.ibm.com,
	frankeh@watson.ibm.com, Martin.Bligh@us.ibm.com,
	wli@holomorpy.com, linux-kernel@vger.kernel.org
Subject: Re: large page patch (fwd) (fwd)
Date: Sat, 03 Aug 2002 17:28:36 -0700 (PDT)	[thread overview]
Message-ID: <20020803.172836.60864598.davem@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0208031027330.3981-100000@home.transmeta.com>

   From: Linus Torvalds <torvalds@transmeta.com>
   Date: Sat, 3 Aug 2002 10:35:00 -0700 (PDT)

   David, you did page coloring once.
   
   I bet your patches worked reasonably well to color into 4 or 8 colors.
   
   How well do you think something like your old patches would work if
   
    - you _require_ 1024 colors in order to get the TLB speedup on some
      hypothetical machine (the same hypothetical machine that might
      hypothetically run on 95% of all hardware ;)
   
    - the machine is under heavy load, and heavy load is exactly when you
      want this optimization to trigger.
   
   Can you explain this difficulty to people?
   
Actually, we need some clarification here.  I tried coloring several
times, the problem with my diffs is that I tried to do the coloring
all the time no matter what.

I wanted strict coloring on the 2-color level for broken L1 caches
that have aliasing problems.  If I could make this work, all of the
dumb cache flushing I have to do on Sparcs could be deleted.  Because
of this, I couldn't legitimately change the cache flushing rules
unless I had absolutely strict coloring done on all pages where it
mattered (basically anything that could end up in the user's address
space).

So I kept track of color existence precisely in the page lists.  The
implementation was fast, but things got really bad fragmentation wise.

No matter how I tweaked things, just running a kernel build 40 or 50
times would fragment the free page lists to shreds such that 2-order
and up pages simply did not exist.

Another person did an implementation of coloring which basically
worked by allocating a big-order chunk and slicing that up.  It's not
strictly done and that is why his version works better.  In fact I
like that patch a lot and it worked quite well for L2 coloring on
sparc64.  Any time there is page pressure, he tosses away all of the
color carving big-order pages.

   I think we can at some point do the small cases completely transparently,
   with no need for a new system call, and not even any new hint flags. We'll
   just silently do 4/8-page superpages and be done with it. Programs don't
   need to know about it to take advantage of better TLB usage.
   
Ok.  I think even 64-page ones are viable to attempt but we'll see.
Most TLB's that do superpages seem to have a range from the base
page size to the largest supported superpage with 2-powers of two
being incrememnted between each supported size.

For example on Sparc64 this is:

8K	PAGE_SIZE
64K	PAGE_SIZE * 8
512K	PAGE_SIZE * 64
4M	PAGE_SIZE * 512

One of the transparent large page implementations just defined a
small array that the core code used to try and see "hey how big
a superpage can we try" and if the largest for the area failed
(because page orders that large weren't available) it would simply
fall back to the next smallest superpage size.

  parent reply	other threads:[~2002-08-04  0:38 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E17ahdi-0001RC-00@w-gerrit2>
2002-08-02 19:34 ` large page patch (fwd) (fwd) Linus Torvalds
2002-08-03  3:19   ` David Mosberger
2002-08-03  3:32     ` Linus Torvalds
2002-08-03  4:17       ` David Mosberger
2002-08-03  4:26         ` Linus Torvalds
2002-08-03  4:39           ` David Mosberger
2002-08-03  5:20             ` David S. Miller
2002-08-03 17:35               ` Linus Torvalds
2002-08-03 19:30                 ` David Mosberger
2002-08-03 19:43                   ` Linus Torvalds
2002-08-03 21:18                     ` David Mosberger
2002-08-03 21:54                       ` Hubertus Franke
2002-08-04  0:35                         ` David S. Miller
2002-08-04  2:25                           ` David Mosberger
2002-08-04 17:19                             ` Hubertus Franke
2002-08-09 15:20                               ` Daniel Phillips
2002-08-09 15:56                                 ` Linus Torvalds
2002-08-09 16:15                                   ` Daniel Phillips
2002-08-09 16:31                                     ` Rik van Riel
2002-08-09 18:08                                       ` Daniel Phillips
2002-08-09 16:51                                     ` Linus Torvalds
2002-08-09 17:11                                       ` Daniel Phillips
2002-08-09 16:27                                   ` Rik van Riel
2002-08-09 16:52                                     ` Linus Torvalds
2002-08-09 17:40                                       ` yodaiken
2002-08-09 19:15                                         ` Rik van Riel
2002-08-09 21:20                                           ` Linus Torvalds
2002-08-09 21:19                                         ` Marcin Dalecki
2002-08-09 17:46                                       ` Bill Rugolsky Jr.
2002-08-12  9:23                                     ` Helge Hafting
2002-08-13  3:15                                       ` Bill Davidsen
2002-08-13  3:31                                         ` Rik van Riel
2002-08-13  7:28                                         ` Helge Hafting
2002-08-09 21:38                                   ` Andrew Morton
2002-08-10 18:20                                     ` Eric W. Biederman
2002-08-10 18:59                                       ` Daniel Phillips
2002-08-10 19:55                                       ` Rik van Riel
2002-08-10 19:54                                         ` Eric W. Biederman
2002-08-09 18:32                                 ` Hubertus Franke
2002-08-09 18:43                                   ` Daniel Phillips
2002-08-09 19:17                                     ` Hubertus Franke
2002-08-11 20:30                                 ` Alan Cox
2002-08-11 22:33                                   ` Daniel Phillips
2002-08-11 22:55                                     ` Linus Torvalds
2002-08-11 22:56                                       ` Linus Torvalds
2002-08-11 23:36                                         ` William Lee Irwin III
2002-08-12  0:46                                         ` Alan Cox
2002-08-11 23:42                                           ` Rik van Riel
2002-08-11 23:50                                             ` Larry McVoy
2002-08-12  8:22                                               ` Daniel Phillips
2002-08-13  8:40                                                 ` Rob Landley
2002-08-13 15:06                                                   ` Alan Cox
2002-08-13 11:36                                                     ` Rob Landley
2002-08-13 16:51                                                       ` Linus Torvalds
2002-08-13 12:53                                                         ` Rob Landley
2002-08-13 17:14                                                         ` Ruth Ivimey-Cook
2002-08-13 17:29                                                         ` Rik van Riel
2002-08-13 13:18                                                           ` Rob Landley
2002-08-13 18:32                                                             ` Linus Torvalds
2002-08-13 13:50                                                               ` Rob Landley
2002-08-13 17:45                                                           ` Alexander Viro
2002-08-13 17:55                                                           ` Linus Torvalds
2002-08-13 17:59                                                             ` Rik van Riel
2002-08-13 13:35                                                               ` Rob Landley
2002-08-13 19:12                                                             ` Daniel Phillips
2002-08-22 12:03                                                           ` bill davidsen
     [not found]                                                       ` <Pine.LNX.4.44.0208130942130.7411-100000@home.transmeta.com >
2002-08-13 18:46                                                         ` large page patch (fwd) Mike Galbraith
2002-08-11 23:44                                           ` large page patch (fwd) (fwd) Daniel Phillips
2002-08-13  8:51                                             ` Rob Landley
2002-08-13 16:47                                               ` Daniel Phillips
2002-08-13 13:09                                                 ` Rob Landley
2002-08-11 23:15                                       ` Larry McVoy
2002-08-12  1:26                                         ` Linus Torvalds
2002-08-12  5:05                                           ` Larry McVoy
2002-08-12 10:31                                           ` Alan Cox
2002-08-04  0:28                 ` David S. Miller [this message]
2002-08-04 17:31                   ` Hubertus Franke
2002-08-04 18:38                     ` Linus Torvalds
2002-08-04 19:23                       ` Andrew Morton
2002-08-04 19:28                         ` Linus Torvalds
2002-08-05  5:42                           ` David S. Miller
2002-08-04 19:30                       ` Hubertus Franke
2002-08-04 20:23                         ` William Lee Irwin III
2002-08-05 16:59                         ` David Mosberger
2002-08-05 17:21                           ` Hubertus Franke
2002-08-05 21:10                             ` Jamie Lokier
2002-08-04 19:41                       ` Rik van Riel
2002-08-05  5:40                     ` David S. Miller
2002-08-03 18:41             ` Hubertus Franke
2002-08-03 19:39               ` Linus Torvalds
2002-08-04  0:32                 ` David S. Miller
2002-08-03 19:41               ` David Mosberger
2002-08-03 20:53                 ` Hubertus Franke
2002-08-03 21:26                   ` David Mosberger
2002-08-03 21:50                     ` Hubertus Franke
2002-08-04  0:34                   ` David S. Miller
2002-08-04  0:31                 ` David S. Miller
2002-08-04 17:25                   ` Hubertus Franke
     [not found] <200208041331.24895.frankeh@watson.ibm.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.44.0208041131380.10314-100000@home.transmeta.com.suse.lists.linux.kernel>
     [not found]   ` <3D4D7F24.10AC4BDB@zip.com.au.suse.lists.linux.kernel>
2002-08-04 20:20     ` Andi Kleen
2002-08-04 23:51       ` Eric W. Biederman
2002-08-05 23:30 Seth, Rohit
2002-08-06  5:01 ` David Mosberger
2002-08-06  4:58   ` David S. Miller
2002-08-06  5:19     ` David Mosberger
2002-08-06  5:08       ` David S. Miller
2002-08-06  5:32         ` David Mosberger
2002-08-06 19:11 ` Hubertus Franke
  -- strict thread matches above, loose matches on Subject: below --
2002-08-06 20:38 Luck, Tony
2002-08-06 21:03 ` Hubertus Franke
2002-08-09 17:51 Seth, Rohit

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=20020803.172836.60864598.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=davidm@hpl.hp.com \
    --cc=davidm@napali.hpl.hp.com \
    --cc=frankeh@watson.ibm.com \
    --cc=gh@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=wli@holomorpy.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