From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data
Date: Thu, 9 Jul 2020 20:26:16 -0700 [thread overview]
Message-ID: <20200710032616.GC545837@google.com> (raw)
In-Reply-To: <ae1a3e8a-6209-8d4b-7235-5c8897076501@huawei.com>
On 07/10, Chao Yu wrote:
> On 2020/7/10 3:05, Jaegeuk Kim wrote:
> > On 07/09, Chao Yu wrote:
> >> On 2020/7/9 13:30, Jaegeuk Kim wrote:
> >>> It doesn't need to bypass flushing quota data in background.
> >>
> >> The condition is used to flush quota data in batch to avoid random
> >> small-sized udpate, did you hit any problem here?
> >
> > I suspect this causes fault injection test being stuck by waiting for inode
> > writeback completion. With this patch, it has been running w/o any issue so far.
> > I keep an eye on this.
>
> Hmmm.. so that this patch may not fix the root cause, and it may hiding the
> issue deeper.
>
> How about just keeping this patch in our private branch to let fault injection
> test not be stuck? until we find the root cause in upstream codes.
Well, I don't think this hides something. When the issue happens, I saw inodes
being stuck due to writeback while only quota has some dirty data. At that time,
there was no dirty data page from other inodes.
More specifically, I suspect __writeback_inodes_sb_nr() gives WB_SYNC_NONE and
waits for wb_wait_for_completion().
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> >>> ---
> >>> fs/f2fs/data.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> >>> index 44645f4f914b6..72e8b50e588c1 100644
> >>> --- a/fs/f2fs/data.c
> >>> +++ b/fs/f2fs/data.c
> >>> @@ -3148,7 +3148,7 @@ static int __f2fs_write_data_pages(struct address_space *mapping,
> >>> if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
> >>> goto skip_write;
> >>>
> >>> - if ((S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) &&
> >>> + if (S_ISDIR(inode->i_mode) &&
> >>> wbc->sync_mode == WB_SYNC_NONE &&
> >>> get_dirty_pages(inode) < nr_pages_to_skip(sbi, DATA) &&
> >>> f2fs_available_free_memory(sbi, DIRTY_DENTS))
> >>>
> > .
> >
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Subject: Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data
Date: Thu, 9 Jul 2020 20:26:16 -0700 [thread overview]
Message-ID: <20200710032616.GC545837@google.com> (raw)
In-Reply-To: <ae1a3e8a-6209-8d4b-7235-5c8897076501@huawei.com>
On 07/10, Chao Yu wrote:
> On 2020/7/10 3:05, Jaegeuk Kim wrote:
> > On 07/09, Chao Yu wrote:
> >> On 2020/7/9 13:30, Jaegeuk Kim wrote:
> >>> It doesn't need to bypass flushing quota data in background.
> >>
> >> The condition is used to flush quota data in batch to avoid random
> >> small-sized udpate, did you hit any problem here?
> >
> > I suspect this causes fault injection test being stuck by waiting for inode
> > writeback completion. With this patch, it has been running w/o any issue so far.
> > I keep an eye on this.
>
> Hmmm.. so that this patch may not fix the root cause, and it may hiding the
> issue deeper.
>
> How about just keeping this patch in our private branch to let fault injection
> test not be stuck? until we find the root cause in upstream codes.
Well, I don't think this hides something. When the issue happens, I saw inodes
being stuck due to writeback while only quota has some dirty data. At that time,
there was no dirty data page from other inodes.
More specifically, I suspect __writeback_inodes_sb_nr() gives WB_SYNC_NONE and
waits for wb_wait_for_completion().
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> >>> ---
> >>> fs/f2fs/data.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> >>> index 44645f4f914b6..72e8b50e588c1 100644
> >>> --- a/fs/f2fs/data.c
> >>> +++ b/fs/f2fs/data.c
> >>> @@ -3148,7 +3148,7 @@ static int __f2fs_write_data_pages(struct address_space *mapping,
> >>> if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
> >>> goto skip_write;
> >>>
> >>> - if ((S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) &&
> >>> + if (S_ISDIR(inode->i_mode) &&
> >>> wbc->sync_mode == WB_SYNC_NONE &&
> >>> get_dirty_pages(inode) < nr_pages_to_skip(sbi, DATA) &&
> >>> f2fs_available_free_memory(sbi, DIRTY_DENTS))
> >>>
> > .
> >
next prev parent reply other threads:[~2020-07-10 3:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 5:30 [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data Jaegeuk Kim
2020-07-09 5:30 ` Jaegeuk Kim
2020-07-09 7:10 ` [f2fs-dev] " Chao Yu
2020-07-09 7:10 ` Chao Yu
2020-07-09 19:05 ` Jaegeuk Kim
2020-07-09 19:05 ` Jaegeuk Kim
2020-07-10 3:15 ` Chao Yu
2020-07-10 3:15 ` Chao Yu
2020-07-10 3:26 ` Jaegeuk Kim [this message]
2020-07-10 3:26 ` Jaegeuk Kim
2020-07-10 3:41 ` Chao Yu
2020-07-10 3:41 ` Chao Yu
2020-07-10 3:50 ` Jaegeuk Kim
2020-07-10 3:50 ` Jaegeuk Kim
2020-07-10 7:31 ` Chao Yu
2020-07-10 7:31 ` Chao Yu
2020-07-10 8:16 ` Jaegeuk Kim
2020-07-10 8:16 ` Jaegeuk Kim
2020-07-13 17:59 ` Jaegeuk Kim
2020-07-13 17:59 ` Jaegeuk Kim
2020-07-14 12:14 ` Chao Yu
2020-07-14 12:14 ` Chao Yu
2020-07-15 19:10 ` Jaegeuk Kim
2020-07-15 19:10 ` Jaegeuk Kim
2020-07-16 1:08 ` Chao Yu
2020-07-16 1:08 ` Chao Yu
2020-07-16 1:10 ` Jaegeuk Kim
2020-07-16 1:10 ` Jaegeuk Kim
2020-07-16 1:17 ` Chao Yu
2020-07-16 1:17 ` Chao Yu
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=20200710032616.GC545837@google.com \
--to=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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.