Test Run with Alternative pmap Implementation

Ulrich Grey usenet at ulrich-grey.de
Mon Nov 24 15:40:54 UTC 2014


On Mon, 24 Nov 2014 07:53:34 -0700
Ian Lepore <ian at FreeBSD.org> wrote:

Hello,
> I've also been testing those pmap changes this weekend.  The only change
> I made was to add options ARM_NEW_PMAP and NKPT2PG=64 to the kernel
> config.  In particular, I did not change VM_MEMATTR_UNCACHEABLE (so that
> in effect I'm also testing the recent busdma changes).

Here is the reason, why I changed VM_MEMATTR_UNCACHEABLE
(from an email to Svatopluk Kraus):

When I tried to log into the system with ssh, it lasts a minute or more
to get an input prompt. It is the kernel, that was compiled with:

options NKPT2PG=64

I tried to reduce the number (32, 26, 23, 21). 20 is the default in
sys/arm/include/pmap-v6.h and crashes the system, # 21 works! If I
decrease the numbers, the delay is reduced but remains cumbersome. If I
use the kernel with old pmap, no delay is noticeable.

If I use the TAB-key for autocompletition, there is a delay of some
seconds until the prompt appears. If I press the RIGHT-ARROW-key after
the TAB-key, sometimes it is faster. In the editor ee the cursor
disappears for seconds. I have never observed such a behavior before. 

This appears only with ssh. On the serial console there is no delay.
Is there any way to improve that?

The answer from Svatopluk Kraus:

I have only one idea for now what you can try. We changed memory attributes
for uncacheable DMA buffers. However, some not well designed drivers could
have unpredictable behaviour now. Get sys/arm/include/vm.h file and
change following line:

#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_NOCACHE

to

 #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO

My answer:

I have changed sys/arm/include/vm.h
and rebuild the kernel. 

The normal behavior is back.

Ulrich


More information about the freebsd-arm mailing list