Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Nov 2014 09:13:46 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Ulrich Grey <usenet@ulrich-grey.de>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Test Run with Alternative pmap Implementation
Message-ID:  <1416845626.1147.391.camel@revolution.hippie.lan>
In-Reply-To: <20141124164006.ce3e101e04828df66bacada5@ulrich-grey.de>
References:  <20141113125236.b16cd4e5f0e339eac0494cd4@ulrich-grey.de> <C6FED1A5-490C-47BE-B071-484271ED370E@me.com> <20141115143444.5ad037548e06f289d2532fb7@ulrich-grey.de> <CAFHCsPUJ1HhLqAjitPg6mPzhMYSui64Xmu4omO7Pkp%2B0kPZnAA@mail.gmail.com> <20141119225903.81fbbc7809093a0e6e0de9d5@ulrich-grey.de> <CAFHCsPXnSFY_X-O73M%2Bh0xO_XJ0cTmkRwtu-o4omPndnfbEhmg@mail.gmail.com> <20141120151900.a68c6d8316b96a62cb65d17a@ulrich-grey.de> <CAFHCsPWTnU7j0MC7YSHFFDE97%2B%2BBrnkJKGnK9zkxVGemaa6nAw@mail.gmail.com> <20141121115941.54d4e36b103341c3adf7eb36@ulrich-grey.de> <20141124132733.4e96b906f0d1ab69969dddd9@ulrich-grey.de> <1416840814.1147.380.camel@revolution.hippie.lan> <20141124164006.ce3e101e04828df66bacada5@ulrich-grey.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2014-11-24 at 16:40 +0100, Ulrich Grey wrote:
> On Mon, 24 Nov 2014 07:53:34 -0700
> Ian Lepore <ian@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.

Oh, of course!  This is my fault and I forgot all about it, I'm sorry.
There is a bug in the ffec driver that was being masked by the
VM_MEMATTR_SO, I discovered it right away Saturday morning when I
applied the pmap patches (I couldn't even boot with nfsroot), fixed it,
then forgot to commit the fix.

I'll go commit it right now (r274967), then you should be able to set
the MEMATTR back to VM_MEMATTR_NOCACHE.  

We may find similar trouble in other device drivers, especially network
drivers.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1416845626.1147.391.camel>