From nobody Wed Apr 20 09:12:29 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 D59B211E2F24 for ; Wed, 20 Apr 2022 09:12:32 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kjw1D5nV7z3qQ7; Wed, 20 Apr 2022 09:12:32 +0000 (UTC) (envelope-from tijl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650445952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qhnRJeUo04a3/3CAcPlD1mMDd+GJUOyewjl31IaX0ss=; b=FKDmT9xB7aQ06pxxIe5OBFPyrsmoontywfafPO+IuY7K1qw6yFzqrvfVcXPXiS+Imu88uP ioCpQsQth9QvUe35U54t07aTL9nvdxC0LRLhQ3nrs6gFnrj3pw9Hc0wxLGEg7hd4sxyJhf p85WIDiNXcMR+rFKnBdxIKcL4xaPr3KYHg8wE2evXRySEy1on/4zqykhy523r2SaFTMK1r 57m1u/55CLX63q0RIs58smOqFN5CjUhlCS/dI+l9sv0E8n5jQbdKMc0d1Vhr8If+4Cg3tk 3k3ksTeoBIEyL+P/PzCA13teycpVK6xjJ+0bMg3aypDf6no2/5+MEsUwAR5Acw== Received: from localhost (unknown [IPv6:2a02:a03f:894b:4700:2027:3123:4dd2:95df]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tijl) by smtp.freebsd.org (Postfix) with ESMTPSA id 45D3F239B8; Wed, 20 Apr 2022 09:12:32 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Date: Wed, 20 Apr 2022 11:12:29 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Michael Wayne Cc: freebsd-hackers@freebsd.org Subject: Re: Can not build kernel on 1GB VM *Solved* Message-ID: <20220420111229.36de494f@FreeBSD.org> In-Reply-To: <20220418173333.GC72471@post.wayne47.com> References: <20220415174953.GE13678@post.wayne47.com> <20220418173333.GC72471@post.wayne47.com> 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: multipart/mixed; boundary="MP_/=QnV_61ajZ/4x58KPu69/l8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650445952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qhnRJeUo04a3/3CAcPlD1mMDd+GJUOyewjl31IaX0ss=; b=yCpYygTiy0GYSR1bsAOINuae36ucJ7Nc+w4VFZ4ScFfxDMfgfEsCEDOmWtWlnqj+Qi5eu2 fMwddLo9MicA+EH4kPk6NEJdc/c5Q117RQDPwaZCGq+OlJci+Uy1l4frhAfD+FiH4s2E70 Cz7ra+gGlrq+BHe7W6OPIy08M3uAqpMBTRyvEdY1xG+oztmzDbuLXN9YdOWa4tVbQwlvex SV5rEwBGuNDH/HVdS+dQXkK74bofmOIcePmi/SQCyrr0XErjxovZoOP6hHnBpkxVA+PmSc daGr5Y4fx0LiPPtBCQx5l0R/SdOmb27tnt+Mn1JbOla3sDmtPT/IE9SkO6Ekjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650445952; a=rsa-sha256; cv=none; b=O0eB4KKnyNqybG1RhXskbQ0wkF+Xz/s8Qd+a1R4cnNPeWWJCC9XCknBO2kTaH6yD0dMS2a F0TpcGIzOfE9yccW8P34S++q0+DyWQHIRxvoetL6VLy5yMmVPXDr0Q5mIUMvYzAYbksl/c AUJkYgZDb24Yby1d35BRszMxSTVOJFGn05PVkZjWLUZ3k56jVx9/Gyw6BNONBchdpPxfbs 9df6VKt6PpucnGeeVgIrfSDcehdTX3SH8QDaJJQ53M6QdHJ8NnqxrVN2KcUVBrG0xpP8Zq hBH0jB3pmT7glqRRjHcfwG6PQiKrK7/Lrty4b7toxfJ6vEUHgju+nFi1AtmJ/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --MP_/=QnV_61ajZ/4x58KPu69/l8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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? Can you still reproduce it now that you run 12.3? If so, can you try the attached patch? It prevents background 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. --MP_/=QnV_61ajZ/4x58KPu69/l8 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=vm_pageout_worker.patch 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; } --MP_/=QnV_61ajZ/4x58KPu69/l8--