From owner-dev-commits-src-all@freebsd.org Fri Aug 6 16:53:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43BD2659B3D; Fri, 6 Aug 2021 16:53:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GhBPZ1Hwkz4rdt; Fri, 6 Aug 2021 16:53:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 7339EEEE5; Fri, 6 Aug 2021 16:53:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 09066b98663d - main - ktls: Use the new PNOLOCK flag To: Hans Petter Selasky , Ian Lepore , Andrew Gallatin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202108052251.175MpwTC090873@gitrepo.freebsd.org> <18ed8e5f-d042-478b-e18c-dd0de7affcae@selasky.org> From: John Baldwin Message-ID: <0805925c-dc48-c55c-2682-abffb672459c@FreeBSD.org> Date: Fri, 6 Aug 2021 09:53:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <18ed8e5f-d042-478b-e18c-dd0de7affcae@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2021 16:53:22 -0000 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