Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2018 05:03:58 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Kurt Jaeger <lists@opsec.eu>
Cc:        FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: swapping is completely broken in -CURRENT r334649?
Message-ID:  <20180615090358.GB32922@pesky.lan>
In-Reply-To: <20180615084808.GF4028@home.opsec.eu>
References:  <d3ee2b8f-bdbe-ce25-f496-6267f9bb0212@FreeBSD.org> <20180605181716.73b8ea91@ernst.home> <2925b27f-43cf-8813-eaa7-4f3d12bef8f0@FreeBSD.org> <20180605214808.GA94301@pesky> <20180615051025.GA79327@ns.kevlo.org> <20180615084022.GA32922@pesky.lan> <20180615084808.GF4028@home.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 15, 2018 at 10:48:08AM +0200, Kurt Jaeger wrote:
> Hi!
> 
> > The change was committed as r334752.  Are you seeing unexpected OOM
> > kills on or after that revision?
> 
> When I tried to run a qemu-based poudriere run yesterday on a r334918
> box, it killed a few processes outside of that run and did not
> work out.
> 
> I'm unsure it was because of that problem or a problem with qemu.

How much memory and swap does the guest have?  Were you consistently
able to complete a run before?

If it's happening during a poudriere run, it may well have been a true
OOM situation.  The patch below prints a few stats to the dmesg before
the kill.  The output of that together with "sysctl vm" output should be
enough to determine what's happening.

diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 264c98203c51..9c7ebcf451ec 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1670,6 +1670,8 @@ vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage,
 	 * start OOM.  Initiate the selection and signaling of the
 	 * victim.
 	 */
+	printf("v_free_count: %u, v_inactive_count: %u\n",
+	    vmd->vmd_free_count, vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt);
 	vm_pageout_oom(VM_OOM_MEM);
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180615090358.GB32922>