public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Joakim Tjernlund <Joakim.Tjernlund@transmode•se>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: [PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss.
Date: Wed, 17 Mar 2010 08:19:36 +1100	[thread overview]
Message-ID: <1268774376.2335.130.camel@pasglop> (raw)
In-Reply-To: <1267172983-28721-3-git-send-email-Joakim.Tjernlund@transmode.se>

On Fri, 2010-02-26 at 09:29 +0100, Joakim Tjernlund wrote:
> +#ifdef CONFIG_MODULES
> +       /* Only modules will cause ITLB Misses as we always
> +        * pin the first 8MB of kernel memory */
>         andi.   r11, r10, 0x0800        /* Address >= 0x80000000 */
>         beq     3f
>         lis     r11, swapper_pg_dir@h
>         ori     r11, r11, swapper_pg_dir@l
>         rlwimi  r10, r11, 0, 2, 19
>  3:
> +#endif

You can optimize that further I think...

You can probably just remove the code above, and add something to
do_page_fault() that lazily copies the kernel PGD entries from
swapper_pg_dir to the app pgdir. (You can even pre-fill that when
creating a new mm).

Cheers,
Ben.

  parent reply	other threads:[~2010-03-16 21:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26  8:29 [PATCH 0/4] 8xx: Optimize TLB Miss code Joakim Tjernlund
2010-02-26  8:29 ` [PATCH 1/4] 8xx: Optimze TLB Miss handlers Joakim Tjernlund
2010-02-26  8:29   ` [PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss Joakim Tjernlund
2010-02-26  8:29     ` [PATCH 3/4] 8xx: Don't touch ACCESSED when no SWAP Joakim Tjernlund
2010-02-26  8:29       ` [PATCH 4/4] 8xx: Use SPRG2 and DAR registers to stash r11 and cr Joakim Tjernlund
2010-03-16 21:20       ` [PATCH 3/4] 8xx: Don't touch ACCESSED when no SWAP Benjamin Herrenschmidt
2010-03-17  7:40         ` Joakim Tjernlund
2010-03-16 21:19     ` Benjamin Herrenschmidt [this message]
2010-03-17  7:35       ` [PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss Joakim Tjernlund
2010-02-26 19:50   ` [PATCH 1/4] 8xx: Optimze TLB Miss handlers Scott Wood
2010-02-27 15:23     ` Joakim Tjernlund
2010-02-26 20:10   ` Kumar Gala
2010-02-27 15:25     ` Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2010-03-02 15:37 [PATCH 0/4] 8xx: Optimize TLB Miss code Joakim Tjernlund
2010-03-02 15:37 ` [PATCH 1/4] 8xx: Optimze TLB Miss handlers Joakim Tjernlund
2010-03-02 15:37   ` [PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss Joakim Tjernlund

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=1268774376.2335.130.camel@pasglop \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=Joakim.Tjernlund@transmode$(echo .)se \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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