From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796280644; b=itQJ0X0qmd2cpA9lPV4+mjI4vlb0X5IESPhlC1gDNrlDcRDOsPREVa7dmXBdwSJpyXzQ qP03viJAc/FpawF2pfJU+A6Py5QeK2Bhb+Nr+xCJrGb0qVFpk5c3IV8IOcw+Sg9woavJF lP0y6fr55MsHDZfhiOYVUlQQIj/CxPfKG2SRrTL4xseTEqD8rE2XnpTI5Q40gxgDeuZiN yeZwICHTpLyitWn0CGq2EhtwLw0gRTfCuXHTVJblk2bnga1kXH1e0K8hrGrkGzO4I3rcD YFxMgDBQcA53wkvVDgxQA5SJQxZhMfa50sgFWEDvjkgNUbTJFi5sY1OCzstjGiAyCjQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796280644; h=Received:DKIM-Signature:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=H9x7+XaWkmKJdvI6stAc9QeGUAW1gIAKdlWh2s7+Epc=; b=f5iFpNfxxBFDmdZdkrn1PK3QFQ1Qe5s/ucYyogk5A25envjgb4rptL4KFvTtvhHbZE0B uICB3nCR+2B2PdzFh8eTjLKysRjOGa2pmgiE9mY247+NY4K0zRfy715KTbanujeepTJ/X BSDtSPdGQ0uihXxpADS7f63VICYOBq5AujR4Hpre2mArVAL2xeKaxNCcGQhJdF2TInAv6 Ckcx/ceoMFh8liGo2n1qYLXyWbuvzVO2UIn6IiJTNL/7qZFz1tyy1KweltDiQvOdOmlQh a8dkVlTbPVm7OAvlmAcTjm+l+zdpCOWT3CaxgqQJZsgMgbzIU1iTy+DFuUqZKBwFWGQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ktUpTXu6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEFFF606A322 for ; Thu, 3 Dec 2026 06:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ktUpTXu6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 592DC1F00893; Thu, 3 Dec 2026 06:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796280644; bh=H9x7+XaWkmKJdvI6stAc9QeGUAW1gIAKdlWh2s7+Epc=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ktUpTXu6ZAKG7O/FoEqOMDGiST/81XFEK1ixL2XH8jHCw7yMpyUCFpIAM6pbuUiZR iZNs26M2WXgcCdx/43x4c+ymP6eVjHB9sbbwQoEVj4eDprpASpXDlS37tP9R/AXa6z k1aRXw0FI75o9jXg/3FzBLL6nxg8vv1Q2wAYLIITJ5nTDsB5b2OLTnzEs1xqfMmibW nyaoXu3rffMIMERWY/52Nsfa7/XAy1U5s8k25ZnYanQJtMKMbzA3lIAvtZGk3WcO9N QUD89c3OHVPAinWnfVaE9Z1Gq8pz6YAhlm6nH+7l7mFJ7J2VVQPG9Sk90tLVAbGnio suH9c6HdluVXQ== Date: Wed, 02 Dec 2026 20:50:43 -1000 Message-ID: From: Tejun Heo To: Bart Van Assche Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , Damien Le Moal , Josef Bacik , Nathan Chancellor Subject: Re: [PATCH 18/52] blk-iocost: Add lock context annotations In-Reply-To: <5b569b98da5ba0870f371a70264d01f6438625ce.1796261587.git.bvanassche@acm.org> References: <5b569b98da5ba0870f371a70264d01f6438625ce.1796261587.git.bvanassche@acm.org> X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, Bart. On Wed, Dec 02, 2026 at 05:59:41PM -0800, Bart Van Assche wrote: > Many blk-iocost functions verify with lockdep_assert_held() that their > callers hold ioc->lock and/or iocg->waitq.lock. Annotate these > functions and also a few functions without such an assertion but that > are always called with these locks held with __must_hold() such that > Clang verifies the locking requirements at compile time: I raised this before and I'm not going to nack this as it's a subsystem-wide decision, but I still think this is a silly feel-good thing which doesn't add anything substantial, just noise and churn: - This doesn't catch anything subtle. The conditionally locked and lockless accesses stay unannotated as the tool can't express them. Only the trivial cases are left, and those are now fairly reliably covered by AI review. - More than half of the functions annotated here already have lockdep_assert_held() for the same lock. - 19/52 adds an argument to hweight_after_donation() only because clang can't tell that iocg->ioc->lock and ioc->lock are the same lock. Thanks. -- tejun