[okl4-developer] Fast address-space switching on GUMSTIX?

Abi Nourai anourai at ok-labs.com
Sat May 24 05:42:23 EST 2008


Hi Xi

On 23/05/2008, at 6:58 PM, xi yang wrote:

> Hi folks:
>
> I write a test, running two thread in two different address space,
> each thread execute
> while(1){
>  print the timestamp of performance counter of xscale
>  set counter of xscale to 0
>  L4_Yield()
> }
> It shows that the cost of switching  to other address space is about
> 4000 cycles and 7 TLB miss.
> I find that after each time of address space switching, when new
> thread begin execute in user level, a exception occurs, which is a
> domain exception and then kernel flush the TLB and cache.
>
> Dose Fast address space switching works on gumstix(Xscale) ?


Do the two address spaces you're switching between reside in different  
1MB aligned regions of virtual memory ?  This is a constraint of ARMv5  
hardware (that's derived from top level page-table entries mapping 1MB  
regions) and is required to avoid domain faults which is where you're  
taking the hit.

Regards
Abi



More information about the Developer mailing list