tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: amd64: svs
On Thu, 11 Jan 2018, Martin Husemann wrote:
> 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.
If you look in the CVS history you will see that I originally had a much
more clever implementation. The claim back then is that the current
implementation (stolen from MIPS I believe) was simpler and performed
better. I didn't necessarily agree at the time but didn't want to argue
the point.
Eduardo
Home |
Main Index |
Thread Index |
Old Index