All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: "Jens Axboe" <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	"Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Christoph Hellwig" <hch@lst.de>,
	syzbot+4c7e0f9b94ad65811efb@syzkaller.appspotmail.com
Subject: Re: [PATCH 3/3] block: use blk_mq_no_io() for avoiding lock dependency
Date: Thu, 3 Apr 2025 10:54:34 +0800	[thread overview]
Message-ID: <Z-34as5GCEtdYsOy@fedora> (raw)
In-Reply-To: <089a8cf5-bc01-468f-ab96-f04448e034ae@linux.ibm.com>

On Wed, Apr 02, 2025 at 07:13:56PM +0530, Nilay Shroff wrote:
> 
> 
> On 4/2/25 10:08 AM, Ming Lei wrote:
> > Use blk_mq_no_io() to prevent IO from entering queue for avoiding lock
> > dependency between freeze lock and elevator lock, and we have got many
> > such reports:
> > 
> > Reported-by: syzbot+4c7e0f9b94ad65811efb@syzkaller.appspotmail.com
> > Closes: https://lore.kernel.org/linux-block/67e6b425.050a0220.2f068f.007b.GAE@google.com/
> > Reported-by: Valdis Klētnieks <valdis.kletnieks@vt.edu>
> > Closes: https://lore.kernel.org/linux-block/7755.1743228130@turing-police/#t
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> 
> I tested this series on my system and this works well as we cut dependency
> between ->elevator_lock and ->freeze_lock. However don't we plan to now 
> model blk_mq_enter_no_io and blk_mq_exit_no_io as lock/unlock for supporting 
> lockdep? Maybe we don't.

Good point!

> 
> Overall changes looks good to me:
> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>

Thanks for the review!

lockdep modeling for blk_mq_enter_no_io and blk_mq_exit_no_io has been
added in V2.


Thanks, 
Ming


      reply	other threads:[~2025-04-03  2:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  4:38 [PATCH 0/3] block: fix lock dependency between freeze and elevator lock Ming Lei
2025-04-02  4:38 ` [PATCH 1/3] block: add blk_mq_enter_no_io() and blk_mq_exit_no_io() Ming Lei
2025-04-02  7:55   ` Ming Lei
2025-04-02 13:50   ` Nilay Shroff
2025-04-02  4:38 ` [PATCH 2/3] block: don't call freeze queue in elevator_switch() and elevator_disable() Ming Lei
2025-04-02 13:45   ` Nilay Shroff
2025-04-02  4:38 ` [PATCH 3/3] block: use blk_mq_no_io() for avoiding lock dependency Ming Lei
2025-04-02 13:43   ` Nilay Shroff
2025-04-03  2:54     ` Ming Lei [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=Z-34as5GCEtdYsOy@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=nilay@linux.ibm.com \
    --cc=syzbot+4c7e0f9b94ad65811efb@syzkaller.appspotmail.com \
    --cc=valdis.kletnieks@vt.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.