tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: amd64: svs
On Thu, Jan 11, 2018 at 08:14:59PM +0100, Jaromír Dole?ek wrote:
> Okay, I'll look into this. The feature seems pretty simple to use, though
> it will need
> some care to allow inactive processes to relinguish PCID when there is
> shortage.
All sane architectures are already using it ;-)
Sparc64 uses a pretty simple scheme, see pmap.c:ctx_alloc:
mutex_enter(&curcpu()->ci_ctx_lock);
ctx = curcpu()->ci_pmap_next_ctx++;
/*
* if we have run out of contexts, remove all user entries from
* the TSB, TLB and dcache and start over with context 1 again.
*/
if (ctx == curcpu()->ci_numctx) {
If we start doing something more clever, we should make it MD and change all
existing architectures to it.
Martin
Home |
Main Index |
Thread Index |
Old Index