From nobody Mon Apr 10 14:33:08 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 4PwBKM1Zzlz44KPc; Mon, 10 Apr 2023 14:33:11 +0000 (UTC) (envelope-from jah@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4PwBKL6Vt7z3hW9; Mon, 10 Apr 2023 14:33:10 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681137191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4QlhUE0lxls9FeOdVtUpkSpYgQiE+AeAA9Ms01ESRiE=; b=av5mitQN5BgmCuw5q0HBxwZI2KrP8a/hb2ETDsG2myThA6zspkUn+RUxr4+w/aJJdjikzL gxbKm4DaYb+lFwbmVtOVoxV/rj4aNxTBUOiFQMThKuAfp1+mAXZym422qXKunL+Llz/P9i KTqiUHlhdPMneURntbxPHn3oj1nqj3MNV4Li62hIwtvm+0OqNuzM7PcJbizJVV/Gfd5Jmz f8DTrxpc8U7wcAI6xyBB0kxr0bZWfdJGJ2DngZkseH+8OG9aBzTA35lUrp7oMay+/onvTH w+Vx9JTZpGBZTvJB1PfUNsyI3t1dUO91MXSwyEaBwKV5TqkUgg+sFqE9f9P6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681137191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4QlhUE0lxls9FeOdVtUpkSpYgQiE+AeAA9Ms01ESRiE=; b=bC+M1dMuZsOyYLtUr/KXkJ3JiGZjBG7nVMn5hWd/FBK+PX8SFpm5hbZ7GrbcvrVP/r9kLC BfXkJAwEOxajeWCaiPhf2gPL0/7YtPpjpi+JTBYR4xV5LHnaZB1Ag4E+7f2+eJjn90t0Uj cxoQ2iW0JHTfAp/jWH///bu8xw0/ogHgTC9HjXgSfkFBx6J1Ai/sFzVs2W5aN0UFeRGfX4 +6+x/JnpIfMJBSoTnrXhafAXIgQEr87wuaMVfJBmBCqG95qNGG4rYnoHlb5QJKE3yu2MmM 5SyUhZ1/Jm5dVYesReE2yv42l123f38S6Rfw+Cc7FKK4Yd6lTulM1I8oAdc2/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681137191; a=rsa-sha256; cv=none; b=Du3DrhhbDT60qnrtkD82QxOte02yg+8NWdvw7i60iNaQ8B5MXPyzEBZ8tZqkekdY/e4XZ2 Q6Xtm9PRgCYq4yiWdSIRafW4fRVFLRrC3Vy1aURyCW53pZ986wfOHTq0Ept7b92gtfNezv lUhVarx05xdKZyzP5oTfA1EXZRtuYTiHOcqXq9Vr3zsrX/fEr625RWPYp0yxHE5rPUU2MA MVXvDaWO93jPx4Equ05Ihmv11ttoNfGBRSa3JXJyUewasCTCSe/1gbzPbO5BY+LLfYj/1+ smBQ0+Ba/IG18kcVVquaLPHFQ3C9LQhmnFg4fi3MBEKqnC4LuH8588RAQ8B47Q== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (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) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PwBKL3PLFzXFS; Mon, 10 Apr 2023 14:33:10 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Mon, 10 Apr 2023 09:33:08 -0500 From: "Jason A. Harmening" To: Konstantin Belousov 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-ThisMailContainsUnwantedMimeParts: N On Mon, Apr 10, 2023 at 07:58:11AM +0300, Konstantin Belousov wrote: > 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. Ah right, sorry. I keep forgetting we have a separate assert_vop_elocked() function for checking exclusive locks, while assert_vop_locked() just sort of gives up when it comes to shared locks. In any case, I like your proposal for restoring the diagnostics, thank you for posting it so quickly. > > > 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.