All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Jan Kara <jack@suse.cz>,
	Dan Schatzberg <schatzberg.dan@gmail.com>,
	linux-block@vger.kernel.org
Subject: Re: fix loop autoclear for xfstets xfs/049
Date: Thu, 23 Dec 2021 14:40:50 +0100	[thread overview]
Message-ID: <20211223134050.GD19129@quack2.suse.cz> (raw)
In-Reply-To: <20211223112509.1116461-1-hch@lst.de>

Hi!

On Thu 23-12-21 12:25:07, Christoph Hellwig wrote:
> this is a 3rd approach to fix the loop autoclean delay.  Instead of
> working around the workqueue lockdep issues this switches the loop
> driver to use a global workqueue and thus avoids the destroy_workqueue
> call under disk->open_mutex entirely.

Hum, I have nothing against this but I'm somewhat wondering: Lockdep was
originally complaining because it somehow managed to find a write whose
completion was indirectly dependent on disk->open_mutex and
destroy_workqueue() could wait for such write to complete under
disk->open_mutex. Now your patch will fix this lockdep complaint but we
still would wait for the write to complete through blk_mq_freeze_queue()
(just lockdep is not clever enough to detect this). So IHMO if there was a
deadlock before, it will be still there with your changes. Now I'm not 100%
sure the deadlock lockdep was complaining about is real in the first place
because it involved some writes to proc files (taking some locks) and
hibernation mutex and whatnot.  But it is true that writing to a backing
file will grab fs freeze protection and that can bring with it all sorts of
interesting dependencies.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  parent reply	other threads:[~2021-12-23 13:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 11:25 fix loop autoclear for xfstets xfs/049 Christoph Hellwig
2021-12-23 11:25 ` [PATCH 1/2] loop: use a global workqueue Christoph Hellwig
2021-12-23 14:37   ` Tetsuo Handa
2021-12-24  6:03     ` Christoph Hellwig
2021-12-24 12:05       ` Tetsuo Handa
2021-12-24 14:05         ` Tetsuo Handa
2021-12-29 17:21         ` Christoph Hellwig
2021-12-29  2:23   ` Tetsuo Handa
2021-12-23 11:25 ` [PATCH 2/2] loop: make autoclear operation synchronous again Christoph Hellwig
2021-12-23 13:40 ` Jan Kara [this message]
2021-12-24  6:02   ` fix loop autoclear for xfstets xfs/049 Christoph Hellwig
2021-12-26  7:09     ` Tetsuo Handa
2021-12-29 17:20       ` Christoph Hellwig

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=20211223134050.GD19129@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=schatzberg.dan@gmail.com \
    /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.