git: 09066b98663d - main - ktls: Use the new PNOLOCK flag

John Baldwin jhb at FreeBSD.org
Fri Aug 6 16:53:22 UTC 2021


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


More information about the dev-commits-src-all mailing list