Date: Fri, 6 Aug 2021 09:53:14 -0700 From: John Baldwin <jhb@FreeBSD.org> To: Hans Petter Selasky <hps@selasky.org>, Ian Lepore <ian@freebsd.org>, Andrew Gallatin <gallatin@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 09066b98663d - main - ktls: Use the new PNOLOCK flag Message-ID: <0805925c-dc48-c55c-2682-abffb672459c@FreeBSD.org> In-Reply-To: <18ed8e5f-d042-478b-e18c-dd0de7affcae@selasky.org> References: <202108052251.175MpwTC090873@gitrepo.freebsd.org> <c9584533ca172253d3243276b8216127facd5a7a.camel@freebsd.org> <18ed8e5f-d042-478b-e18c-dd0de7affcae@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/6/21 2:09 AM, Hans Petter Selasky wrote: > On 8/6/21 1:58 AM, Ian Lepore wrote: >> I especially like this solution, it documents explicitly what you're >> doing and why. (Earlier I was considering mumbling something about >> "there should be a comment to say a sleep-forever is known safe here".) > > Hi, > > MPSAFE is the word to use, like with other things related to GIANT? > > PNOLOCK -> PMPSAFE ?? No, I suggested PNOLOCK explicitly to mean "I'm purposefully sleeping without any lock at all". Normally MPSAFE has been used to mean "this has had other locking added so that it no longer needs Giant". I'd actually generally like to axe MPSAFE from our tree and invert flags to have things opt-in to Giant instead. This is already in place for sysctls (and for 14 we can probably axe the SYSCTL_MPSAFE flag). INTR_MPSAFE is probably one I'd like to flip next to an INTR_GIANT (though probably for 14 both flags would have to live as the sysctl flags did for 13). CALLOUT_MPSAFE -> CALLOUT_GIANT is perhaps another candidate. It'd be nice to get all these done in 14-current. I'm not super optimistic we can fully eradicate Giant in 14, but at least we can start better isolating it in terms of most code not having to declare "I don't need it" anymore. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0805925c-dc48-c55c-2682-abffb672459c>