From owner-freebsd-arm@FreeBSD.ORG Thu Nov 27 12:39:52 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20FF0298; Thu, 27 Nov 2014 12:39:52 +0000 (UTC) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::11]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DA0CDA7; Thu, 27 Nov 2014 12:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1417091962; l=5450; s=domk; d=ulrich-grey.de; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References: In-Reply-To:Subject:Cc:To:From:Date; bh=zZxly5sBLanyveRKh/XxeBDiWYA=; b=yDY/PetZ4BW1l0Kre8RibcepnleGVXb17sMugUigvTRth0kcyB42I5KiSAneh4AfPsY 7P+i3LGGaipyPmfLcmHCOtDNLr0GoQ4rNmHyXS7fLDg03fZJvL72drzQ+N13JCEBRxT/6 EuKuG1wHCH38m5eC6srh7LguqWDgF/7VtkQ= X-RZG-AUTH: :OX8Be0W8W+pMC3rDLL/lo2xV/LZTbZkYhOcjg8suic3iYr/B8J9Lzp3TJg49uMv/iwf9 X-RZG-CLASS-ID: mo00 Received: from bbu (p548696C0.dip0.t-ipconnect.de [84.134.150.192]) by smtp.strato.de (RZmta 36.1 DYNA|AUTH) with ESMTPSA id I04a4aqARCdAKtw (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate); Thu, 27 Nov 2014 13:39:10 +0100 (CET) Date: Thu, 27 Nov 2014 13:39:08 +0100 From: Ulrich Grey To: Svatopluk Kraus Subject: Re: Another Test Run with Alternative pmap Implementation Message-Id: <20141127133908.532e7963aade036f67d49a1d@ulrich-grey.de> In-Reply-To: References: <20141113125236.b16cd4e5f0e339eac0494cd4@ulrich-grey.de> <20141115143444.5ad037548e06f289d2532fb7@ulrich-grey.de> <20141119225903.81fbbc7809093a0e6e0de9d5@ulrich-grey.de> <20141120151900.a68c6d8316b96a62cb65d17a@ulrich-grey.de> <20141121115941.54d4e36b103341c3adf7eb36@ulrich-grey.de> <20141124132733.4e96b906f0d1ab69969dddd9@ulrich-grey.de> <1416840814.1147.380.camel@revolution.hippie.lan> <20141125225451.924a5df4bdb4753db273b8c5@ulrich-grey.de> Organization: - X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.22; armv6-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, Ian Lepore X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 12:39:52 -0000 I have built a new kernel with debugging options and ARM_NEW_PMAP. I have modified the file /src/sys/arm/include/vm.h: /* #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_NOCACHE XXname is misused by DMA */ #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /*name is misused by DMA */ my crashtest make -j20 buildworld hung after about 8 - 9 hours at the usual place: --- cpp_helpers --- c++ -O -pipe -I/usr/local/DEVEL/STREJDA/freebsd/contrib/atf -Qunused-arguments -Wno-c+ +11-extensions -L/usr/obj/usr/local/DEVEL/STREJDA/freebsd/tmp/usr/lib/private -rpath /usr/lib/private -o cpp_helpers cpp_helpers.o /usr/obj/usr/local/DEVEL/STREJDA/freebsd/lib/atf/libatf-c++/libatf-c+ +.so /usr/obj/usr/local/DEVEL/STREJDA/freebsd/lib/atf/libatf-c/libatf-c.so Something went wrong and I lost connection to the serial console, so I could not break to debugger. Here some explanation about my "test system". It was not set up to test something. I only wanted to build some ports which depend on qt4-* (lyx, texworks which depens on texlive). The device has 2 SD-Cards. On /dev/mmcsd1s2a lives root, on /dev/mmcsd0 lives /usr/local. I use USB-Drives, as far as I know there is no SATA-Driver yet for FreeBSD. On /dev/da1 are the portstree and the working directories for compiling ports and the source tree and the obj tree for compiling the system (via symbolic links from /usr). On /dev/da0s1b I have a swap partition (4 GB). As far as I have watched, the system uses no swap, the RAM seems to be big enough. If "top" shows high load (20 or more) there is enough free RAM. It is for precaution only because with my Raspberry I had some crashes during compilation due to tight RAM. Here is an example from the last test: last pid: 65435; load averages: 19.90, 19.41, 19.60 up 0+06:16:00 23:09:00 102 processes: 19 running, 83 sleeping CPU 0: 97.3% user, 0.0% nice, 2.3% system, 0.4% interrupt, 0.0% idle CPU 1: 98.4% user, 0.0% nice, 1.6% system, 0.0% interrupt, 0.0% idle CPU 2: 92.6% user, 0.0% nice, 7.4% system, 0.0% interrupt, 0.0% idle CPU 3: 23.8% user, 0.0% nice, 76.2% system, 0.0% interrupt, 0.0% idle Mem: 499M Active, 849M Inact, 176M Wired, 5824K Cache, 112M Buf, 470M Free Swap: 4095M Total, 4095M Free As a terminal (serial console) I use the Raspberry and a TV Set (HDMI-Interface). root@quad:/usr/src/sys/arm/include # mount /dev/mmcsd1s2a on / (ufs, local, noatime, journaled soft-updates, nfsv4acls) devfs on /dev (devfs, local) /dev/mmcsd1s1 on /boot/msdos (msdosfs, local, noatime) /dev/mmcsd0 on /usr/local (ufs, local, noatime) /dev/da1 on /usr/local/DEVEL (ufs, local) /tmp is not mounted on tmpfs Regards Ulrich ---------------------------------- On Wed, 26 Nov 2014 11:54:42 +0100 Svatopluk Kraus wrote: > On Tue, Nov 25, 2014 at 10:54 PM, Ulrich Grey wrote: > > > Hello, > > > > I updated the source tree from Svatopluk Kraus and build an Image (crochet, > > wandboard-quad). The kernel is compiled with ARM_NEW_PMAP: > > > > root@quad:/usr/home/gwgpi # uname -a > > FreeBSD quad 11.0-CURRENT FreeBSD 11.0-CURRENT #0 428e9d2(master)-dirty: > > Tue Nov 25 > > 09:45:07 UTC 2014 > > root@quad:/usr/local/DEVEL/obj/usr/local/DEVEL/STREJDA/freebsd/sys/WANDBOARD-QUAD > > arm > > > > root@quad:/usr/home/gwgpi # sysctl vm.pmap. > > vm.pmap.pv_entry_max: 1745184 > > vm.pmap.shpgperproc: 200 > > vm.pmap.nkpt2pg: 32 > > vm.pmap.sp_enabled: 1 > > vm.pmap.pte1.demotions: 22 > > vm.pmap.pte1.mappings: 0 > > vm.pmap.pte1.p_failures: 122 > > vm.pmap.pte1.promotions: 38 > > vm.pmap.pv_entry_count: 12369 > > vm.pmap.pc_chunk_count: 43 > > vm.pmap.pc_chunk_allocs: 1981 > > vm.pmap.pc_chunk_frees: 1938 > > vm.pmap.pc_chunk_tryfail: 0 > > vm.pmap.pv_entry_frees: 417470 > > vm.pmap.pv_entry_allocs: 429839 > > vm.pmap.pv_entry_spare: 2079 > > > > # > > Then I did: > > root@quad:/usr/src # make -j20 buildworld > > > > # > > The build hangs here (not for the first time): > > > > --- cpp_helpers --- > > > > c++ -O -pipe -I/usr/local/DEVEL/STREJDA/freebsd/contrib/atf > > -Qunused-arguments -Wno-c+ > > +11-extensions > > -L/usr/obj/usr/local/DEVEL/STREJDA/freebsd/tmp/usr/lib/private > > -rpath /usr/lib/private -o cpp_helpers > > cpp_helpers.o > > /usr/obj/usr/local/DEVEL/STREJDA/freebsd/lib/atf/libatf-c++/libatf-c+ > > +.so /usr/obj/usr/local/DEVEL/STREJDA/freebsd/lib/atf/libatf-c/libatf-c.so > > > > # > > I did a break into the debugger and this is the output: > > [...] > > > > Please tell me: > (0) Does system hang or only the build? Can you terminate the build when it > hangs by ctrl c? > (1) Invariants was on or off? > (2) Memory attributes for DMA buffers was VM_MEMATTR_NOCACHE or > VM_MEMATTR_SO? > (3) How long does the build run before it hangs? > (4) Does it really hang on same place? > > Can you run the test with invariants on if it was off and with memory > attributes for DMA buffers VM_MEMATTR_SO if it was VM_MEMATTR_NOCACHE? If > it helps, set invariants off and try again. > > It's always worth to try it with vm.pmap.sp_enabled=0. > > Considering debug terminal, after you type "show all pcpu", look at output > and type "where #pid" for current threads on all cpus except idle ones. For > example, in sent debug output, there is only one non idle current thread on > cpu #3, so it would be "where 92540". > > Svatopluk Kraus