From: Jes Sorensen <jes@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bjorn_helgaas@hp.com, Nick Piggin <nickpiggin@yahoo.com.au>,
Robin Holt <holt@sgi.com>, Dean Nelson <dcn@sgi.com>,
Hugh Dickins <hugh@veritas.com>
Subject: Re: [patch] do_no_pfn()
Date: Mon, 25 Sep 2006 11:31:05 +0200 [thread overview]
Message-ID: <4517A1D9.2090505@sgi.com> (raw)
In-Reply-To: <20060922124940.5ca5ee87.akpm@osdl.org>
Andrew Morton wrote:
> How does this followup look?
>
> We don't want the rarely-used do_no_pfn() to get inlined in the oft-used
> handle_pte_fault(), using up icache. Mark it noinline and unlikely.
I'd say it looks good - will give a microscopic slowdown for do_no_pfn
but compared to the overall benefit I think thats more than acceptable.
Acked-by: Jes Sorensen <jes@sgi.com>
Cheers,
Jes
> --- a/mm/memory.c~do_no_pfn-tweaks
> +++ a/mm/memory.c
> @@ -2276,8 +2276,10 @@ oom:
> *
> * It is expected that the ->nopfn handler always returns the same pfn
> * for a given virtual mapping.
> + *
> + * Mark this `noinline' to prevent it from bloating the main pagefault code.
> */
> -static int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma,
> +static noinline int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma,
> unsigned long address, pte_t *page_table, pmd_t *pmd,
> int write_access)
> {
> @@ -2376,7 +2378,7 @@ static inline int handle_pte_fault(struc
> return do_no_page(mm, vma, address,
> pte, pmd,
> write_access);
> - if (vma->vm_ops->nopfn)
> + if (unlikely(vma->vm_ops->nopfn))
> return do_no_pfn(mm, vma, address, pte,
> pmd, write_access);
> }
> _
next prev parent reply other threads:[~2006-09-25 9:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 4:33 Arrr! Linux 2.6.18 Linus Torvalds
2006-09-20 4:59 ` Michal Piotrowski
2006-09-20 7:25 ` [patch] do_no_pfn() Jes Sorensen
2006-09-20 15:46 ` Randy.Dunlap
2006-09-20 16:47 ` Jes Sorensen
2006-09-22 19:49 ` Andrew Morton
2006-09-25 9:31 ` Jes Sorensen [this message]
2006-09-22 21:51 ` Arrr! Linux 2.6.18 Judith Lebzelter
2006-09-22 22:08 ` Jeff Garzik
2006-09-22 22:57 ` Dale Farnsworth
2006-09-22 22:58 ` Jeff Garzik
2006-09-29 8:36 ` Mark Lord
2006-09-29 14:49 ` Linus Torvalds
2006-09-29 8:40 ` Mark Lord
2006-09-29 8:44 ` Andrew Morton
2006-09-29 17:52 ` Mark Lord
2006-09-29 19:42 ` Rafael J. Wysocki
2006-09-29 19:58 ` Mark Lord
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=4517A1D9.2090505@sgi.com \
--to=jes@sgi.com \
--cc=akpm@osdl.org \
--cc=bjorn_helgaas@hp.com \
--cc=dcn@sgi.com \
--cc=holt@sgi.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.