Re: Can not build kernel on 1GB VM

From: Michael Wayne <>
Date: Tue, 17 May 2022 13:56:16 UTC
On Mon, May 16, 2022 at 12:07:18PM -0700, Mark Millard wrote:
> On 2022-May-16, at 07:37, Michael Wayne <> wrote:
> > More info. I am running UFS so the ZFS should not be an issue
> > 
> >   % pstat -s
> >   Device          1K-blocks     Used    Avail Capacity
> >   /dev/md99         1048576        0  1048576     0%
> That may well explain some (or all?) of what is going on:
> file-system/vnode backed swap spaces are subject to deadlocks.

> Which suggested patch(s)? Any patches for . . .

This one line change (patch reduced to only relevant info) that
was posted earlier on the list.
   --- a/sys/vm/vm_pageout.c
   +++ b/sys/vm/vm_pageout.c
   @@ -1069,7 +1069,7 @@ vm_pageout_laundry_worker(void *arg)
   -               if (target == 0 && ndirty * isqrt(howmany(nfreed + 1,
   +               if (target == 0 && ndirty * isqrt(howmany(nfreed,

> Can you switch to using a swap partition instead of
> file-system/vnode backed swap space?

AFAICT, this would require a reinstall as there's no easy way to 
shrink the existing image. 

Summary of events to date:
- This was installed as a lightweight machine. It will never hit swap in
  "normal" operation.
- The only reason I added a swap file was that someplace in 11.x building
  the kernel ran out of memory.
- I only build a custom kernel to get options TCP_SIGNATURE for bird.
- The swap file worked correctly for all of 11.x until I tried to build 12.x.
- There likely out to be a FAQ or handbook page about how to lay
  out lightweight machines. Having used it since 4.x, 1 GB "seems" like
  a pretty big machine, yet these issues arose.