From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=199.89.1.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796401668; b=RcLbwMZnQNeUe49HtYCkVXjPxKRBAhCzBC/icJLsqh5YHKgtxDuQnUwchHXllYgzinwr spaRms7u3eCUVBwJFMlx2rqdi/khsv4bTEseNukVOgWJbuLOkH5PcS8d8w7D+GG9m8YrQ gAbU7iXcSZeU3RtwWnnpqUdPbGCJUuyJuyxqVQixAPjfSxj3PxHh7+x3P8HItjPL/pOEg 7GBght29/jNOZjCu1oHNU3/ZGGndog7KhZ386qumXrzx/jUTsj3OEBxTc6URJvQVbwqP3 8iV/Z4ZEu7WQRLUl4raqcR1E5pI0c2hRXiA+M1C7bDy2xZTMuBqIClIHxPQPAkMNEmA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796401668; h=DMARC-Filter:Received:DKIM-Signature:X-Virus-Scanned:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc: References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=XBzuRg+3ECu/ssSUktCkkZcyh3/3Ep3EpJtXdsbmLZU=; b=W3qTKakd1JqBvbcvrV7nyEFSpK9pBnG3STa1+KvSkYI/2V2KRRFXNMOaneHcpE2zJzhQ k1DO4w+q0DtzWDwHb1VZeIrXLn/b7iv93CB00cZ8pNImqVKSns+rHWSRroS01Xx2Ym5HR iw6hV79dTa1z6I3oDlpjSMTQlD71WwA+VXh3n5GxBGo+Ky8CCl7mMiqIOwgjslyoKqgRR VTSXI06AhCk/TN+TIm3B9X4OwUtoKw0VTM5qiVnYNDKN63nHkAZf3eszbKhq8coFpeGTi P9t+onUaC0HblC3WPEDfANE6H6CaazgZl0VQEnOueNtJRrkRSD4Jv/wpb5UYfdjcb8w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b="r3b3z/te"; arc=none smtp.remote-ip=199.89.1.16 Received: from 013.lax.mailroute.net (013.lax.mailroute.net [199.89.1.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9604606A32C for ; Fri, 4 Dec 2026 16:27:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A9604606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=r3b3z/te Received: from localhost (localhost [127.0.0.1]) by 013.lax.mailroute.net (Postfix) with ESMTP id 4jgxjn3NFdzlfvq6; Fri, 4 Dec 2026 16:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1796401657; x=1798993658; bh=XBzuRg+3ECu/ssSUktCkkZcy h3/3Ep3EpJtXdsbmLZU=; b=r3b3z/tewrp6dc0oJ2j8XOhW8GgsThBT7fI7zMuR X/gss/U+5oca7or/ru2iQtUm1Jg5XEVc70DwP4YILr9w3a2m3wrAR3+DweLiF+v+ 6R4LTmENv/x6gTDbkIDkJVcm48J6Qhucp3v9MjVXiO7lN4UTCV8s1gVjKtl+6YE/ hBHtN6JEoLQ8d6oVX7PhAXR6R/YKTMiExqVHVPA8S+U1dQ12ft2sgXaA/vfcCByD SzNTpzz9p/f2wqvAZGF91Yrj0k47nIGKTciwqvO+3NHmZnYcbxWi+F3WFszVNsbH 6/FHRdp3ZBmIk04s7alqfHA0Jp7oliDio5yrFuzBVNeqHQ== X-Virus-Scanned: by MailRoute Received: from 013.lax.mailroute.net ([127.0.0.1]) by localhost (013.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id GpJXoXIPmBba; Fri, 4 Dec 2026 16:27:37 +0000 (UTC) Received: from [IPV6:2a00:79e0:2ed2:d:bf:8f3f:4080:57f] (unknown [104.135.182.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 013.lax.mailroute.net (Postfix) with ESMTPSA id 4jgxjj4x7Kzlfvq4; Fri, 4 Dec 2026 16:27:37 +0000 (UTC) Message-ID: Date: Fri, 4 Dec 2026 08:27:29 -0800 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] block: add context annotations for tag_list_lock and quiesce_lock To: Nilay Shroff , axboe@kernel.dk, mt4022@columbia.edu, hch@lst.de, mkhalfella@purestorage.com, kbusch@kernel.org, josef@toxicpanda.com, tom.leiming@gmail.com, tz2294@columbia.edu, gjoyce@linux.ibm.com Cc: linux-block@vger.kernel.org References: <20261203152318.654390-5-nilay@linux.ibm.com> <20261203152318.654390-8-nilay@linux.ibm.com> <9d8dd1c0-e9ee-4329-9d57-3d3eb07a4fe4@acm.org> Content-Language: en-US From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 12/4/26 1:36 AM, Nilay Shroff wrote: > Alternatively, I could also directly make use of context_unsafe(...) > as a statement expression and add both initialization under it, like > shown below: >=20 > context_unsafe( > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 INIT_LIST_HEAD(&set->tag_li= st); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 set->quiesce_depth =3D 0; > ); This sounds good to me. >> =C2=A0>=C2=A0 int blk_mq_alloc_sched_res_batch(struct xarray *elv_tbl, >> =C2=A0> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct blk_mq_tag_= set *set, unsigned int nr_hw_queues); >> =C2=A0> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct blk_mq_tag_= set *set, unsigned int nr_hw_queues) >> =C2=A0> +=C2=A0=C2=A0=C2=A0 __must_hold(&set->tag_list_lock); >> =C2=A0>=C2=A0 int blk_mq_alloc_sched_ctx_batch(struct xarray *elv_tbl, >> =C2=A0> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct blk_mq_tag_= set *set); >> =C2=A0> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct blk_mq_tag_= set *set) >> =C2=A0> +=C2=A0=C2=A0=C2=A0 __must_hold(&set->tag_list_lock); >> >> Both functions have a lockdep_assert_held_write() call for >> set->update_nr_hwq_lock. Has it been considered to add >> __must_hold(&set->update_nr_hwq_lock) to these declarations too? >> > Yes I considered doing that but then realized the scope of > annotating set->update_nr_hwq_lock is much bigger then only > annotating these two functions and so thought I'd address it > in a different patch covering all relevant annotation needed > for set->update_nr_hwq_lock instead=C2=A0 of adding it in this series. >=20 > That said, if you prefer, I could add one more patch in the same > series to address locking requirement of set->update_nr_hwq_lock. An additional patch is fine with me. Leaving this for later is also fine with me. Thanks, Bart.