Date: Fri, 16 Dec 2022 17:29:33 +0100 From: Mateusz Guzik <mjguzik@gmail.com> To: Zhenlei Huang <zlei.huang@gmail.com> Cc: freebsd-jail@freebsd.org Subject: Re: Is it possible to employ epoch to simplify managing prison lifecycle Message-ID: <CAGudoHHe8zo%2B7x4Myhotj60BJsASuV109Aj_Rkhg95RNVsTeaw@mail.gmail.com> In-Reply-To: <9BD54A54-A809-4D3E-BCBA-639E6C61FE37@FreeBSD.org> References: <9BD54A54-A809-4D3E-BCBA-639E6C61FE37@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/16/22, Zhenlei Huang <zlei.huang@gmail.com> wrote: > Hi, > > While hacking `sys/kern/kern_jail.c` I got lost. > > There're lots of ref / unref and flags to prevent visit invalid prison > while > concurrent modification is possible and some refs looks weird. > > Is it possible to employ epoch(9) to simplify managing of prison lifecycle > ? > Some of the ref/unref cycles are probably avoidable to begin with, but ultimately the thing to do here is to employ per-cpu reference counting, if at all needed. I have a wip patch to provide such a mechanism, it may or may not land this month. -- Mateusz Guzik <mjguzik gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHHe8zo%2B7x4Myhotj60BJsASuV109Aj_Rkhg95RNVsTeaw>