mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: "David S. Miller" <davem@redhat.com>
Cc: davidm@hpl.hp.com, davidm@napali.hpl.hp.com, hugh@veritas.com,
	linux-kernel@vger.kernel.org, andrea@suse.de,
	torvalds@transmeta.com
Subject: Re: Q: PREFETCH_STRIDE/16
Date: Thu, 23 May 2002 11:32:24 -0700	[thread overview]
Message-ID: <15597.13752.344276.648677@napali.hpl.hp.com> (raw)
In-Reply-To: <20020523.100058.12299944.davem@redhat.com>

>>>>> On Thu, 23 May 2002 10:00:58 -0700 (PDT), "David S. Miller" <davem@redhat.com> said:

  DaveM> You'd be surprised how many 0 bits there will be in the
  DaveM> average process.  Even if you bring in all of emacs, glibc,
  DaveM> X11R6 libs etc. and the anonymous memory, there are still a
  DaveM> HUGE portion of the address space totally unused.

But don't confuse the portion of address space used with the number of
page tables in use!  Even if you use a teeny tiny portion of a 64-bit
address space, you can still have hundreds and thousands of page table
pages.

Also, we should not ignore the advantages of the current scheme:

 o It's so straight-forward, it's virtually impossible to screw it up
   (with the hashed scheme, forgetting to set a bit just once could
   lead to very difficult-to-track-down bugs; been there, done that,
   in a slightly different context, and it was ugly...).

 o Performance is very predicable (basically linear in virtual address
   space in use).  There is a danger that a hashed scheme would be
   optimized for today's workloads.  As the working sets increase over
   the years, the hashed scheme could eventually break down and the
   worst part would be that it would be very hard to notice (only
   effect is bad performance for very large tasks; few benchmarks
   would probably catch such worse-than-optimal performance).

  DaveM> But like you said, worth experimenting with :-) First test
  DaveM> would be, start with 1 unsigned long as the bitmask in
  DaveM> mm_context_t.  Just implement the bit setting part.  Then at
  DaveM> exit() count how many 0 bits are left, record this into some
  DaveM> counter table which has one counter for 0 --> N_BITS_IN_LONG.
  DaveM> Make some debug /proc thing which spits the table out.
  DaveM> (hint: at fork, clear out the child's bitmask before
  DaveM> copy_page_range is run for best results :-)

  DaveM> You can use this to do vaious things and see how much there
  DaveM> is to gain by going to two unsigned longs, three, etc.

  DaveM> Then you can hack up the actual clear_page_tables
  DaveM> optimization (to start) and measure the result.

Yes.  Hopefully, someone with some spare time at hand can play with
this.

	--david

      reply	other threads:[~2002-05-23 18:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-23 15:12 Hugh Dickins
2002-05-23 16:26 ` David Mosberger
2002-05-23 16:21   ` David S. Miller
2002-05-23 16:43     ` David Mosberger
2002-05-23 16:34       ` David S. Miller
2002-05-23 17:02         ` David Mosberger
2002-05-23 17:00           ` David S. Miller
2002-05-23 18:32             ` David Mosberger [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=15597.13752.344276.648677@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=andrea@suse.de \
    --cc=davem@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®