All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Nilay Shroff <nilay@linux.ibm.com>,
	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
Subject: Re: [PATCH 3/3] block: add context annotations for tag_list_lock and quiesce_lock
Date: Fri, 4 Dec 2026 08:27:29 -0800	[thread overview]
Message-ID: <af652a20-975e-426b-9b2a-211ddea55510@acm.org> (raw)
In-Reply-To: <ac1e67a1-9822-4bc4-b0b4-ec1c88e71faf@linux.ibm.com>

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:
> 
> context_unsafe(
>          INIT_LIST_HEAD(&set->tag_list);
>          set->quiesce_depth = 0;
> );

This sounds good to me.

>>  >  int blk_mq_alloc_sched_res_batch(struct xarray *elv_tbl,
>>  > -        struct blk_mq_tag_set *set, unsigned int nr_hw_queues);
>>  > +        struct blk_mq_tag_set *set, unsigned int nr_hw_queues)
>>  > +    __must_hold(&set->tag_list_lock);
>>  >  int blk_mq_alloc_sched_ctx_batch(struct xarray *elv_tbl,
>>  > -        struct blk_mq_tag_set *set);
>>  > +        struct blk_mq_tag_set *set)
>>  > +    __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  of adding it in this series.
> 
> 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.

      reply	other threads:[~2026-12-04 16:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 15:22 [PATCH 0/3] block: remove RCU protection and add context annotation Nilay Shroff
2026-12-03 15:22 ` [PATCH 1/3] block: remove RCU protection for tag_set_list Nilay Shroff
2026-12-03 16:41   ` Bart Van Assche
2026-12-03 15:22 ` [PATCH 2/3] block: remove unused blk_mq_free_sched_res_batch() Nilay Shroff
2026-12-03 16:42   ` Bart Van Assche
2026-12-03 15:22 ` [PATCH 3/3] block: add context annotations for tag_list_lock and quiesce_lock Nilay Shroff
2026-12-03 16:43   ` Bart Van Assche
2026-12-04  9:36     ` Nilay Shroff
2026-12-04 16:27       ` Bart Van Assche [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af652a20-975e-426b-9b2a-211ddea55510@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=gjoyce@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mkhalfella@purestorage.com \
    --cc=mt4022@columbia.edu \
    --cc=nilay@linux.ibm.com \
    --cc=tom.leiming@gmail.com \
    --cc=tz2294@columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.