public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: davidm@hpl.hp.com, davidm@napali.hpl.hp.com
Cc: 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 09:34:16 -0700 (PDT)	[thread overview]
Message-ID: <20020523.093416.133929379.davem@redhat.com> (raw)
In-Reply-To: <15597.7242.995639.291333@napali.hpl.hp.com>

   From: David Mosberger <davidm@napali.hpl.hp.com>
   Date: Thu, 23 May 2002 09:43:54 -0700

     DaveM> All of these particular prefetches are amusing, with or
     DaveM> without your fix, considering there are other more powerful
     DaveM> ways to optimize this stuff. :-)
   
   What do you have in mind?

I mentioned this 1 or 2 days ago in the TLB thread with
Linus, you pessimistically maintain a tiny bitmap per
mm_struct which keeps track of where mappings actually
are.  You use some hash function on the virtual address
to determine the bit.  You clear it when the mm_struct is
new, and you just set bits when mappings are installed.
Very simple.

Then all of these "walk all valid page tables" loops that scan entire
mostly empty pages of pgd/pmd/pte entries for no reason can just check
the bitmap instead.

Most of the exit overhead is in clear_page_tables walking over entire
pages.  It effectively flushes the cache unless all you are doing is
fork/exit/fork/exit

  reply	other threads:[~2002-05-23 16:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-23 15:12 Q: PREFETCH_STRIDE/16 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 [this message]
2002-05-23 17:02         ` David Mosberger
2002-05-23 17:00           ` David S. Miller
2002-05-23 18:32             ` David Mosberger

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=20020523.093416.133929379.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=andrea@suse.de \
    --cc=davidm@hpl.hp.com \
    --cc=davidm@napali.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