public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: linux-ia64@vger.kernel.org
Subject: RE: Prefetch mmap_sem in ia64_do_page_fault()
Date: Wed, 29 Mar 2006 07:11:12 +0000	[thread overview]
Message-ID: <200603290710.k2T7ARg03998@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0603282251410.20180@schroedinger.engr.sgi.com>

Christoph Lameter wrote on Tuesday, March 28, 2006 10:55 PM
> Take a hint from an x86_64 optimization by Arjan van de Ven and use it
> for ia64.
> 
> ...
> 
> Prefetch the mmap_sem, which is critical for the performance of the page fault
> handler. Maybe we can offset the damage done by the kprobes notifier?
> 
> Note: mm may be NULL but I guess that is safe. See 
> 
> +	/* mmap_sem is performance critical.... */
> +	prefetchw(&mm->mmap_sem);
> +

I would say push that a couple of lines down after checking !mm

        if (in_atomic() || !mm)
                goto no_context;

If you insist on prefetching mmap_sem at the very beginning of the
function, then use speculative load, it will "nat" right away with
null pointer without generating any exception at all.  It is super
fast because of nat page.

- Ken

  reply	other threads:[~2006-03-29  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29  6:54 Prefetch mmap_sem in ia64_do_page_fault() Christoph Lameter
2006-03-29  7:11 ` Chen, Kenneth W [this message]
2006-03-29  7:16 ` Christoph Lameter
2006-03-29  7:31 ` Chen, Kenneth W
2006-03-29  7:44 ` Chen, Kenneth W
2006-03-30  2:06 ` Christoph Lameter

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=200603290710.k2T7ARg03998@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    /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