mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	"Light Hsieh (謝明燈)" <Light.Hsieh@mediatek.com>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: avoid the deadlock case when stopping discard thread
Date: Fri, 22 Mar 2024 19:33:57 +0800	[thread overview]
Message-ID: <20240322113357.2599-1-hdanton@sina.com> (raw)
In-Reply-To: <ZfzQz5hwECOEGYVL@google.com>

On Thu, 21 Mar 2024 17:29:03 -0700 Jaegeuk Kim <jaegeuk@kernel.org>
> 
> I posted this patch before Light reported.

Yeah, his report's timestamp is 2024-03-20  6:59, nearly 7 hours later,
which shows that you constructed the deadlock with nothing to do with
his report.
> 
> And, in the report, I didn't get this:
> 
> f2fs_ioc_shutdown() --> freeze_bdev() --> freeze_super() --> sb_wait_write(sb, SB_FREEZE_FS) --> ... ->percpu_down_write().
> 
> because f2fs_ioc_shutdown() calls f2fs_stop_discard_thread() after thaw_bdev()
> like this order.
> 
>  -> freeze_bdev()
>  -> thaw_bdev()
>  -> f2fs_stop_discard_thread()
> 
> Am I missing something?

Light, could you specify to help Jaegeuk understand the deadlock you reported?


  reply	other threads:[~2024-03-22 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  0:14 Jaegeuk Kim
2024-03-20 15:32 ` [f2fs-dev] " Chao Yu
2024-03-21 22:42 ` Hillf Danton
2024-03-22  0:29   ` Jaegeuk Kim
2024-03-22 11:33     ` Hillf Danton [this message]
     [not found]     ` <SI2PR03MB52607606AB0D29C8AB123C1484312@SI2PR03MB5260.apcprd03.prod.outlook.com>
2024-03-22 22:24       ` 回覆: " Jaegeuk Kim
2024-03-26 16:52         ` Jaegeuk Kim
     [not found]           ` <SI2PR03MB526041E42B6BD9C9DA9FBAC184352@SI2PR03MB5260.apcprd03.prod.outlook.com>
2024-04-03  3:39             ` 回覆: " Light Hsieh (謝明燈)
2024-04-04 19:55               ` Jaegeuk Kim
2024-04-12  0:18                 ` 回覆: " Light Hsieh (謝明燈)
2024-04-12 20:50                   ` Jaegeuk Kim
2024-04-16  1:50                     ` 回覆: " Light Hsieh (謝明燈)

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=20240322113357.2599-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=Light.Hsieh@mediatek.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®