From nobody Mon May 9 16:45:28 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6B8D81ACA8FC for ; Mon, 9 May 2022 16:45:36 +0000 (UTC) (envelope-from wayne@post.wayne47.com) Received: from post.wayne47.com (post.wayne47.com [198.11.56.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "post.wayne47.com", Issuer "post.wayne47.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kxn9C4tvMz4jYZ for ; Mon, 9 May 2022 16:45:35 +0000 (UTC) (envelope-from wayne@post.wayne47.com) Received: from post.wayne47.com (post.wayne47.com [198.11.56.11]) by post.wayne47.com (8.15.2/8.15.2) with ESMTPS id 249GjSFB002954 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 9 May 2022 12:45:28 -0400 (EDT) (envelope-from wayne@post.wayne47.com) Received: (from wayne@localhost) by post.wayne47.com (8.15.2/8.15.2/Submit) id 249GjSG3002953 for freebsd-hackers@freebsd.org; Mon, 9 May 2022 12:45:28 -0400 (EDT) (envelope-from wayne) Date: Mon, 9 May 2022 12:45:28 -0400 From: Michael Wayne To: freebsd-hackers@freebsd.org Subject: Re: Can not build kernel on 1GB VM *Solved* Message-ID: <20220509164528.GO72471@post.wayne47.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20220415174953.GE13678@post.wayne47.com> <20220418173333.GC72471@post.wayne47.com> <20220420111229.36de494f@FreeBSD.org> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420111229.36de494f@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 4Kxn9C4tvMz4jYZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of wayne@post.wayne47.com designates 198.11.56.11 as permitted sender) smtp.mailfrom=wayne@post.wayne47.com X-Spamd-Result: default: False [-2.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.959]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:198.11.56.11]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_NA(0.00)[wayne47.com]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_ONE(0.00)[1]; FORGED_SENDER(0.30)[freebsd07@wayne47.com,wayne@post.wayne47.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2015, ipnet:198.11.56.0/24, country:US]; FROM_NEQ_ENVFROM(0.00)[freebsd07@wayne47.com,wayne@post.wayne47.com]; RCVD_TLS_ALL(0.00)[]; ONCE_RECEIVED(0.10)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Apr 20, 2022 at 11:12:29AM +0200, T??l Coosemans wrote: > On Mon, 18 Apr 2022 13:33:33 -0400 Michael Wayne > wrote: > > On Fri, Apr 15, 2022 at 01:49:53PM -0400, Michael Wayne wrote: > >> I have a VM with 1GB RAM running FreeBSD 12.1-RELEASE-p3 > >> > >> I'm trying to upgrade the machine to 12.3 and having swap failures. > > > > I tried a number of things, all of which failed. > > > > Since the offending line is: > > > >> ctfmerge -L VERSION -g -o kernel.full ... > > > > I went digging through makefiles and found: > > MK_CTF=no > > > > Adding this to the command line permitted the build to complete and > > the machine is now running on the new kernel. Hopefully this helps > > others. I'm still not sure why the kernel refused to use swap but > > this is a very easy to duplicate issue. > > How many CPU cores does the VM have? I believe only 1: CPU: Intel Core Processor (Broadwell, no TSX, IBRS) (2394.51-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306d2 Family=0x6 Model=0x3d Stepping=2 Features=0x783fbff Features2=0xfffa3203 AMD Features=0x28100800 AMD Features2=0x21 Structured Extended Features=0x7a9 Structured Extended Features3=0x84000000 XSAVE Features=0x1 Hypervisor: Origin = "KVMKVMKVM" real memory = 1073741824 (1024 MB) avail memory = 1001181184 (954 MB) > Can you still reproduce it now that you run 12.3? Yes. It persists. > If so, can you try the attached patch? It prevents background Building now. > laundering when nfreed == 0, restoring some behaviour from before > https://cgit.freebsd.org/src/commit/?id=c098768e4dad and > https://cgit.freebsd.org/src/commit/?id=60684862588f. > diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c > index 36d5f3275800..df827af3075f 100644 > --- a/sys/vm/vm_pageout.c > +++ b/sys/vm/vm_pageout.c > @@ -1069,7 +1069,7 @@ vm_pageout_laundry_worker(void *arg) > nclean = vmd->vmd_free_count + > vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt; > ndirty = vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt; > - if (target == 0 && ndirty * isqrt(howmany(nfreed + 1, > + if (target == 0 && ndirty * isqrt(howmany(nfreed, > vmd->vmd_free_target - vmd->vmd_free_min)) >= nclean) { > target = vmd->vmd_background_launder_target; > }