Performance of SheevaPlug on 8-stable

Grzegorz Bernacki gjb at semihalf.com
Tue Mar 9 16:12:35 UTC 2010


Maks Verver wrote:
> On 03/08/2010 07:19 PM, Mark Tinguely wrote:
>> Could you do this instead:
>> <code>
>> This would give counts to make sure there is not a logic error in fix_cache.
> 
> I tried this (adding initialization of the flag variable) and the
> problem is triggered with (at least) these values:
> 
>   kwritable uwritable kentries uentries
>       1         0        1        0
>       1         0        1        1
>       0         1        0        1
>       1         0        1        2
> 

It seems that probles is caused by shared mapping between kernel space and user space.
We have page mapped as executable in user space and at the same time the same page is
mapped in kernel space as writable (row 2 and 4 in table above). I am pretty sure that
kernel mapping is from buffer space and the buffer was created to read .text segment from 
file to memory.
I think that instead of turning off cache for user entries it is enough just to write-back 
and invalidate cache for kernel entry, assuming that code is already in buffer.

In row 1 of table there is only one writable and executable kernel entry and I think it 
may be something allocated via  kmem_alloc_wait() and it shouldn't not cause any trouble.

In row 3 we have only one executable and writable user entry and it also shouldn't be a 
problem. I think that user stack is mapped as readable, writable and executable so maybe 
it was page from stack.

grzesiek



More information about the freebsd-arm mailing list