On Tue, Feb 20, 2018 at 08:50:14PM +0100, Otto Moerbeek wrote:

> On Tue, Feb 20, 2018 at 07:52:49PM +0100, Otto Moerbeek wrote:
> 
> > On Tue, Feb 20, 2018 at 08:58:47AM +0100, Otto Moerbeek wrote:
> > 
> > > On Tue, Feb 20, 2018 at 08:52:20AM +0100, Mark Kettenis wrote:
> > > 
> > > > > Date: Mon, 19 Feb 2018 13:49:48 +0100 (CET)
> > > > > From: Mark Kettenis <mark.kette...@xs4all.nl>
> > > > > 
> > > > > The diff below attempts to make the arm64 pmap "mpsafe" and enables MP
> > > > > support.  This diff survived a full build on my Firefly-RK3399 board.
> > > > > It also seems to work on the Overdrive 1000.  It might even work on
> > > > > the Raspberry Pi 3.  I'd appreciate it if people could play with this
> > > > > on the Raspberry Pi and other arm64 hardware they have.
> > > > > 
> > > > > I tried to follow a strategy for making the pmap "mpsafe" that more
> > > > > closely resembles what we did for our other architectures, although I
> > > > > looked at Dale Rahn's diff as well.  It seems I fixed at least some
> > > > > bugs in the process.  But I'm sure there are bugs remaining.  I may
> > > > > even have introduced new ones.  So do expect this to crash and burn,
> > > > > or at least lock up.
> > > > > 
> > > > > I'm also interested in people testing the normal GENERIC kernel with
> > > > > this diff, especially building ports.  There are some changes in there
> > > > > that could affect non-MP as well.
> > > > 
> > > > Here is a slightly better diff that removes a potential lock ordering
> > > > problem, removes a redundant splvm and moves some code around to avoid
> > > > a level of indentation.  Gaining confidence, so I'm looking for ok's
> > > > now.
> > > 
> > > I have been running you diff on my rpi (together with jsg firmware 
> > > update).
> > > 
> > > My rpi has hung twice now while doing a make -j4 in the clang part of
> > > the tree.
> > > 
> > > The last top screen shows it using swap (around 400M) and has three
> > > c++ processes each with resident size around 200M.
> > > 
> > > I'll try this diff now.
> > 
> > Not much change with this diff compared to the first. The system
> > functions more or less, but I'm seeing:
> > 
> > - No processes being scheduled on CPU 0
> > - A hang on reboot
> > - slaacd is not table to configure the ipv6 correctly, the address
> > remains "tentative" and packets do not flow.
> > 
> > Switching to single user mode, init complains it cannot kill all
> > processes. It turns out the main slaacd process hangs and cannot be
> > killed (not even with kill -9).
> > 
> > All this does not happen running a non-MP kernel.
> > 
> >     -Otto
> 
> A bit more info:
> 
> When displaying system processes with top, this is what I see:
> 
> 79636 root     -22    0    0K  121M onproc/0  -         0:05 99.71% idle0
>   519 otto      28    0 1040K 1848K onproc/3  -         0:01  0.05% top
> 58718 root      -5    0    0K  121M sleep/3   -       218:42  0.00% idle1
> 58489 root      -5    0    0K  121M onproc/1  -       218:37  0.00% idle3
> 41386 root      -5    0    0K  121M onproc/2  -       218:28  0.00% idle2
> 
> Compared to and amd64 system, it shows idle0 on cpu0 taking
> cpu time, but not actually accumulating it?
> 
> amd64 system:
> 
> 49951 root     -22    0    0K   10M onproc/0  -       406.8H  0.00% idle0
> 51048 root     -22    0    0K   10M onproc/3  -       406.4H  0.00% idle3
> 60166 root     -22    0    0K   10M idle      -       405.6H  0.00% idle1
>  9554 root     -22    0    0K   10M onproc/2  -       405.2H  0.00% idle2
> 
>       -Otto

With the latest commit to arm64:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/arm64/dev/bcm2836_intr.c.diff?r1=1.6&r2=1.7

the problems have gone and my rpi works as expected.

        -Otto

Reply via email to