Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: i386 lazy pmap switching in trap.c



> On Sun, Feb 10, 2008 at 01:39:09AM +0900, YAMAMOTO Takashi wrote:
> > > The decrement on exit would be cheaper than the loop around pmap_load.
> > > (I've just got a measurable performance gain from removing the loop.)
> > 
> > what exactly do you mean by "removing the loop"?
> 
> s/_RETRY//

does it imply that pmap_load is frequently called for your workload?

> Although I'd also put a 'cmp' and 'jz' after the call earlier, which
> is likely to be benefitialon athlons, but not P4 - which will predict
> the backwards jump as taken if the branch isn't in the branch cache.

do you mean the following?

        1:                                              ; \
        cmpl    $0, CPUVAR(WANT_PMAPLOAD)               ; \
        jz      1f                                      ; \
        call    _C_LABEL(pmap_load)                     ; \
        cmpl    $0, CPUVAR(WANT_PMAPLOAD)               ; \
        jz      1f                                      ; \
        jmp     1b                                      ; \
        1:

YAMAMOTO Takashi

> My guess is that copyin will almost always have the pmap loaded,
> copyout probably more often than not.
> 
> 
>       David
> 
> -- 
> David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index