All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Daeho Jeong <daeho43@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: fix livelock in syncing dirty inodes
Date: Thu, 10 Sep 2026 09:41:11 +0800	[thread overview]
Message-ID: <f5da23a3-7cd2-41dc-b28e-41118cf113e5@kernel.org> (raw)
In-Reply-To: <20260909190636.3151580-1-daeho43@gmail.com>

On 9/10/26 03:06, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> During checkpoint, f2fs_sync_dirty_inodes() and f2fs_sync_inode_meta()
> iterate over dirty inodes in their respective lists. If igrab() fails on
> an inode (e.g. because it is in the freeing state), the loop continues
> without moving the current inode to the tail of the list. As a result,
> subsequent iterations pick the same inode repeatedly, preventing other
> ready dirty inodes in the list from making forward progress and leading
> to a livelock.
> 
> Fix this by moving the current inode to the tail of the list
> (list_move_tail(&fi->{dirty_list,gdirty_list}, head)) before attempting
> igrab() in both f2fs_sync_dirty_inodes() and f2fs_sync_inode_meta().
> 
> Additionally, if igrab() fails, yield the CPU with cond_resched() to
> allow the evicting thread to finish eviction. Remove the redundant
> f2fs_submit_merged_write() call, since .writepages already submits cached
> bios via f2fs_submit_merged_write_cond().
> 
> v2:
> - Also apply list_move_tail() to f2fs_sync_dirty_inodes().
> - Remove redundant f2fs_submit_merged_write() calls from both functions,
>   keeping only cond_resched().
> - Update commit title and description.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2026-09-10  1:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 19:06 [f2fs-dev] [PATCH v2] f2fs: fix livelock in syncing dirty inodes Daeho Jeong
2026-09-10  1:41 ` Chao Yu via Linux-f2fs-devel [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=f5da23a3-7cd2-41dc-b28e-41118cf113e5@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=daeho43@gmail.com \
    --cc=daehojeong@google.com \
    --cc=kernel-team@android.com \
    --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 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.