From: Ralf Baechle <ralf@linux-mips.org>
To: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Kevin Cernekee <cernekee@gmail.com>,
"wilbur.chan" <wilbur512@gmail.com>,
Linux MIPS Mailing List <linux-mips@linux-mips.org>
Subject: Re: Question about Context register in TLB refilling
Date: Mon, 18 Oct 2010 13:48:38 +0100 [thread overview]
Message-ID: <20101018124838.GF27377@linux-mips.org> (raw)
In-Reply-To: <4CBC256A.7020808@niisi.msk.ru>
On Mon, Oct 18, 2010 at 02:46:02PM +0400, Gleb O. Raiko wrote:
> On 18.10.2010 4:00, Ralf Baechle wrote:
> >The aliasing problem is solvable and it may be worth to revisit that old
> >piece of code again now 15 years later.
>
> Before anybody will start to prepare patches, I'd like to note using
> c0_context allows less than 128 processes (their mm contexts in fact
> but who cares) to be directly mapped on 32-bit cpus. So, some kind
> of caching needs to be implemented and it will add overhead on every
> mm switch. Sure, this overhead might be bounded for a real case
> where there is a small number of processes, so they all fit in the
> cache.
> --- Beware, wild assumptions here ---
> I'm afraid the cost of such caching still will be higher than
> loading pgd_current even from main memory on tlb refill.
> --- End of wild assumptions ---
64 context on R2000/R3000, 256 on everything else but R6000 and RM9000
series, 4096 contexts on RM9000 and that context caching is already
there. It's fairly lightweight except in the rare case where the
PID / ASID number overflows and a full TLB flush becomes necessary. A
mm context switch only needs to reload the one wired TLB entry that maps
the pagetables so that's not too bad. The ugly part are the nested
TLB exceptions. I dumped that very early on when I realized the cache
alias issues my implementation had so the earliest usable kernel versions
had the tree walking reload handlers. That's why I don't have any
benchmark results.
Ralf
next prev parent reply other threads:[~2010-10-18 12:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 15:51 Question about Context register in TLB refilling wilbur.chan
2010-10-17 17:50 ` Kevin Cernekee
2010-10-17 19:33 ` Maciej W. Rozycki
2010-10-17 20:52 ` Kevin Cernekee
2010-10-17 21:56 ` Maciej W. Rozycki
2010-10-18 0:00 ` Ralf Baechle
2010-10-18 10:46 ` Gleb O. Raiko
2010-10-18 12:48 ` Ralf Baechle [this message]
2010-10-18 14:03 ` Gleb O. Raiko
2010-10-24 5:26 ` Maciej W. Rozycki
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=20101018124838.GF27377@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=cernekee@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=raiko@niisi.msk.ru \
--cc=wilbur512@gmail.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 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.