From nobody Thu May 25 11:42:46 2023 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QRmQ70SKmz4TPJR for ; Thu, 25 May 2023 11:42:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QRmQ65CxGz3wT4; Thu, 25 May 2023 11:42:54 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.145] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9497A2600D2; Thu, 25 May 2023 13:42:46 +0200 (CEST) Message-ID: <614513c9-06c0-0330-2969-ad4f3ca06569@selasky.org> Date: Thu, 25 May 2023 13:42:46 +0200 List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [RFC] An idea for general kernel post-processing automation in FreeBSD To: Mark Millard Cc: Jessica Clarke , freebsd-arch References: <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4.ref@yahoo.com> <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4@yahoo.com> <6293f06b-927f-432a-3911-808b1d99441b@selasky.org> <9C0CE0A5-150D-4FE1-A838-F1E6A39960F6@yahoo.com> <204FCA67-3FCD-48BA-A373-ABE8AD915D40@yahoo.com> <738F6620-E4FA-4960-87D2-61B93921593C@yahoo.com> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: <738F6620-E4FA-4960-87D2-61B93921593C@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QRmQ65CxGz3wT4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/25/23 12:57, Mark Millard wrote: > The pre-existing code expresses explicitly that no other > routine is allowed to have its own use of the mutex, a > design choice enforced by the compiler as things are > written. (The purpose of the limitation to block scope.) > > Your proposed change removes the compiler enforcement of > that design, allowing use of the mutex by other code in > mlx4_main.c without any notification by the compiler. > > Your proposal has a direction of being more fragile for > bad changes without having to be explicit in code updates > about the change of status. Hi Mark, Looking only at the mutex part alone, you are right, but not when also considering the SYSINIT() part, as implemented in LinuxKPI currently. --HPS