From nobody Mon Apr 10 04:58:11 2023 X-Original-To: dev-commits-src-all@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 4PvxZ4439Bz44mPp; Mon, 10 Apr 2023 04:58:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4PvxZ40sqTz3DZj; Mon, 10 Apr 2023 04:58:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 33A4wC6p008438 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 10 Apr 2023 07:58:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 33A4wC6p008438 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 33A4wBIU008437; Mon, 10 Apr 2023 07:58:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 10 Apr 2023 07:58:11 +0300 From: Konstantin Belousov To: "Jason A. Harmening" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7b6fe2428a97 - main - DEBUG_VFS_LOCKS: use witness if available Message-ID: References: <202304092134.339LYYY5081080@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4PvxZ40sqTz3DZj X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 09, 2023 at 07:14:35PM -0500, Jason A. Harmening wrote: > On Sun, Apr 09, 2023 at 09:34:34PM +0000, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=7b6fe2428a97921e8df882d0a24b87094c37b468 > > > > commit 7b6fe2428a97921e8df882d0a24b87094c37b468 > > Author: Konstantin Belousov > > AuthorDate: 2023-04-08 06:15:00 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2023-04-09 21:34:12 +0000 > > > > DEBUG_VFS_LOCKS: use witness if available > > > > The assert_vop_locked messages are ignored, and file/line information > > is not too useful. Fixing this without changing both witness and VFS > > asserts KPIs is not possible. > > What was the motivation for this change? I thought it was obvious, please look at the old assertion conditions, now in the #else blocks. They are completely unable to handle shared locks. In other words, if the current thread owns the lock shared, or does not, ASSERT_VOP_UNLOCKED/ASSERT_VOP_LOCKED silently do nothing. > At first glance it seems regressive. I've at least found the assert > messages, as well as the vnode state dumping done by vfs_badlock(), > to be really useful for quick debugging of locking issues. This is > especially true when optimization makes the backtrace and frame info > less than useful; see commit 5a4a83fd0e67a0d7787d2f3e09ef0e5552a1ffb6 > for a recent example. This is fair, and I noted it in the commit message. But better working asserts are IMO worth it. Eventually it might be fixed.