From owner-freebsd-arm@freebsd.org Sat Jan 13 15:57:35 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A040E70026 for ; Sat, 13 Jan 2018 15:57:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-115.reflexion.net [208.70.210.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A98F16AA52 for ; Sat, 13 Jan 2018 15:57:33 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 32715 invoked from network); 13 Jan 2018 15:50:47 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 13 Jan 2018 15:50:47 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.4) with SMTP; Sat, 13 Jan 2018 10:50:47 -0500 (EST) Received: (qmail 22258 invoked from network); 13 Jan 2018 15:50:47 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 13 Jan 2018 15:50:47 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 086D2EC93F7; Sat, 13 Jan 2018 07:50:47 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Builworld stalls on rpi2 [various processes stuck in pfault and vmwait with 1996M Free Swap listed by top] From: Mark Millard In-Reply-To: <36827.1515834513@critter.freebsd.dk> Date: Sat, 13 Jan 2018 07:50:46 -0800 Cc: bob prohaska , FreeBSD Hackers , Freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <3EDDDF6B-684A-436E-A2F5-3868BB279951@dsl-only.net> References: <20180113005426.GA48702@www.zefox.net> <19904500-5819-47AC-9666-7103ED87C1CA@dsl-only.net> <36827.1515834513@critter.freebsd.dk> To: Poul-Henning Kamp X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 15:57:35 -0000 On 2018-Jan-13, at 1:08 AM, Poul-Henning Kamp = wrote: > In message <19904500-5819-47AC-9666-7103ED87C1CA@dsl-only.net>, Mark = Millard wr > ites: >=20 >>> Trying to self-host a build of r327859 using a GENERIC kernel at =20 >>> r327664, make seems to stall, with top showing [That text is Bob Prohaska's, not mine.] > In all likelyhood you do not have enough swap configured, getting > through the llvm compilation takes insane amounts of VM these days. As I remember, for the 1 GiByte of RAM that a RPi2B V1.1 has, the boot sequence complains about having Swap: 2048M Total without also adjusting some other defaults, reporting the intended maximum is smaller. As I remember the figure it reports for the intended maximum for the defaults was between 1.6 GiBytes and 1.7 GiBytes. (I do not remember the detailed figure.) [I assume a RPi2B V1.1 (cortex-a7) based instead of the cortex-a53 based V1.2.] [An RPi3 with 1 GiByte of RAM and the aarch64 FreeBSD allows more swap before complaining, something over 3.5 GiBytes of as I remember.] The interesting part of Bob's report was that top showed only a little swap used at the time: Swap: 2048M Total, 52M Used, 1996M Free, 2% Inuse But it shows: Mem: 527M Active, 16M Inact, 98M Laundry, 148M Wired, 86M Buf, 3272K = Free as well, apparently insufficient free memory to put the available swap space to use? FreeBSD's head looks to need to be more aggressive about swapping out so that it keeps enough free-space to allow swapping to occur (at least for some types of contexts). For reference, the pfaults and vmwaits listed by top were: 28760 root 1 52 0 346M 302M pfault 2 13:59 0.00% = c++ 28812 root 1 52 0 208M 167M pfault 2 2:54 0.00% = c++ 28815 root 1 52 0 212M 171M pfault 1 2:20 0.00% = c++ 28820 root 1 52 0 145M 104M pfault 1 2:00 0.00% = c++ 593 root 1 20 0 8156K 1596K vmwait 1 0:04 0.00% = sendmail 590 root 1 20 0 10148K 1552K vmwait 1 0:02 0.00% = sshd > At the very least you can forget anything about make -j N for N>1 I made a similar suggestion. I'll note that I've seen similar hangups with building large ports after a bunch of other ports had already built. After rebooting when I try again the build completes. So, it appears that the prior activity helped work things into reaching the hung-up state. (Fragmentation of some kind?) In general it has been easier (and faster) to build things on the RPi3 than on the RPi2B V1.1, despite both having 1 GiByte of RAM. This suggests 32-bit address space or armv7 specific issues might be involved. =3D=3D=3D Mark Millard markmi at dsl-only.net