Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 2020 02:34:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 248008] Post r358097 an i386 system can hang with many processes sleeping on btalloc
Message-ID:  <bug-248008-227-sZAQz8kkg6@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248008-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248008-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248008

--- Comment #1 from Rick Macklem <rmacklem@FreeBSD.org> ---
Created attachment 216478
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D216478&action=
=3Dedit
Ryan Libby's suggestion #2 way to fix this

When doing a kernel build over NFS, I could frequently get the system
hung with many processes sleeping on btalloc.
Ryan Libby made the following suggestions:
I think the patch is not complete.  It looks like the problem is that
for systems that do not have UMA_MD_SMALL_ALLOC, we do
        uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc);
but we haven't set an appropriate free function.  This is probably why
UMA_ZONE_NOFREE was originally there.  When NOFREE was removed, it was
appropriate for systems with uma_small_alloc.

So by default we get page_free as our free function.  That calls
kmem_free, which calls vmem_free ... but we do our allocs with
vmem_xalloc.  I'm not positive, but I think the problem is that in
effect we vmem_xalloc -> vmem_free, not vmem_xfree.

Three possible fixes:
 1: The one you tested, but this is not best for systems with
    uma_small_alloc.
 2: Pass UMA_ZONE_NOFREE conditional on UMA_MD_SMALL_ALLOC.
 3: Actually provide an appropriate vmem_bt_free function.

I think we should just do option 2 with a comment, it's simple and it's
what we used to do.  I'm not sure how much benefit we would see from
option 3, but it's more work.

This patch implements #2 and seems to fix the problem. The problem
was not reproducible on an amd64 system with memory set to 1Gbyte.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248008-227-sZAQz8kkg6>