[okl4-developer] Fast address-space switching on GUMSTIX?
xi yang
hiyangxi at gmail.com
Mon May 26 21:27:17 EST 2008
On Sat, May 24, 2008 at 2:18 PM, xi yang <hiyangxi at gmail.com> wrote:
> On Sat, May 24, 2008 at 5:42 AM, Abi Nourai <anourai at ok-labs.com> wrote:
>> 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.
> 1)But it seems that iguana adds 0x8000,0000 - 0x8006,0000(In the
> kdebuger, user print ptab command) to every PD, what 's the function
> of this mapping, how to tell the iguana do not mapping these spaces,
> since this will cause domain fault.
>
> 2) Vtimer and other server, they will create a memsection and map it
> to the hardware address, it seems that iguana will map this memsection
> to 0x800X,XXXX, which means after address space switching, there will
> be a domain fault when you access this area.
>
> How to configure iguana to eliminate the overlap mapping? I am not
> familiar with the internal of iguana.
I grep the code, domain fault is caused by accessing stack and heap,
which are mapped to 0x800XXX by iguana .
So, I have two questions
1)How to specify the virtual address of stack and heap in SConscripts
2)Are there some constrains of memsection_create_fixed() system call
of iguana. I invoking this system call and always return NULL.
Regards!
>>
>> Regards
>> Abi
>>
>
More information about the Developer
mailing list