Re: git: eb93b99d6986 - main - in_pcb: delay crfree() down into UMA dtor

From: Gleb Smirnoff <glebius_at_freebsd.org>
Date: Wed, 29 Dec 2021 23:41:30 UTC
On Mon, Dec 27, 2021 at 04:46:54PM -0800, Gleb Smirnoff wrote:
T> T> I have created a patch that would mitigate that problem. Once the zones
T> T> are global, the jails will eventually die if there is some pcb zone
T> T> traffic.
T> T> 
T> T> https://reviews.freebsd.org/D33542
T> 
T> Despite I still believe that PCB zones belong to global state rather than
T> to a VNET, the patch doesn't help to mitigate massive memory leaks with
T> vnet jails on a machine that is dedicated solely to run a test suite.
T> If machine does nothing except a test suite, there is almost zero pcb
T> traffic. If there is no pcb zone traffic, the SMR caches stay, and thus
T> destroyed jails will also stay. Our vnet jail "weights" a lot! Even with
T> the global PCB zone patch applied, each vnet jail creates 33 UMA zones!
T> 
T> I think we need a KPI to purge the SMR caches, and we also need to put
T> vnet jails on a diet. These are two independent problems, of course.

Okay, so on top of the D33542 I have another patch that finally allows me
to endlessly run the test suite(s):

https://github.com/glebius/FreeBSD/commit/355fefcc30036230128d7ac1debcaf60feb24a7e

With the patch I still have about 8 - 10 zombie jails left after test suite
run.  Upon next run they will be recycled, but another 10 zombies will remain.

I'm not very happy with the patch in its current form. We need changes
to UMA to address problems I described in the commit.

I'm not yet putting this patch on the phabricator. Already got too long queue
there.

-- 
Gleb Smirnoff