From: Sahitya Tummala <stummala@codeaurora.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Chao Yu <chao@kernel.org>, Chao Yu <yuchao0@huawei.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: add new idle interval timing for discard and gc paths
Date: Wed, 12 Sep 2018 13:57:40 +0530 [thread overview]
Message-ID: <20180912082740.GB22939@codeaurora.org> (raw)
In-Reply-To: <20180911220958.GC55456@jaegeuk-macbookpro.roam.corp.google.com>
On Tue, Sep 11, 2018 at 03:09:58PM -0700, Jaegeuk Kim wrote:
> On 09/11, Chao Yu wrote:
> > On 2018/9/10 11:47, Sahitya Tummala wrote:
> > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> > > index abf9256..6070681 100644
> > > --- a/fs/f2fs/f2fs.h
> > > +++ b/fs/f2fs/f2fs.h
> > > @@ -1093,6 +1093,8 @@ enum {
> > > enum {
> > > CP_TIME,
> > > REQ_TIME,
> > > + DISCARD_TIME,
> > > + GC_TIME,
> > > MAX_TIME,
> > > };
> > >
> > > @@ -1347,14 +1349,35 @@ static inline void f2fs_update_time(struct f2fs_sb_info *sbi, int type)
> > > sbi->last_time[type] = jiffies;
> > > }
> > >
> > > -static inline bool f2fs_time_over(struct f2fs_sb_info *sbi, int type)
> > > +static inline bool f2fs_time_over_cp(struct f2fs_sb_info *sbi)
>
> I don't see why we need this separately.
Yes, not really required. I will update it.
>
> > > +{
> > > + unsigned long interval = sbi->interval_time[CP_TIME] * HZ;
> > > +
> > > + return time_after(jiffies, sbi->last_time[CP_TIME] + interval);
> > > +}
> > > +
> > > +static inline bool f2fs_time_over_req(struct f2fs_sb_info *sbi, int type)
> > > +{
> > > + unsigned long interval = sbi->interval_time[type] * HZ;
> > > +
> > > + return time_after(jiffies, sbi->last_time[REQ_TIME] + interval);
> > > +}
> > > +
> > > +static inline unsigned int f2fs_get_wait_time(struct f2fs_sb_info *sbi,
> > > + int type)
>
> f2fs_time_to_wait()?
Sure.
> > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> > > index 5c8d004..c0bafea 100644
> > > --- a/fs/f2fs/gc.c
> > > +++ b/fs/f2fs/gc.c
> > > @@ -83,8 +83,10 @@ static int gc_thread_func(void *data)
> > > if (!mutex_trylock(&sbi->gc_mutex))
> > > goto next;
> > >
> > > - if (!is_idle(sbi)) {
> > > - increase_sleep_time(gc_th, &wait_ms);
> > > + if (!is_idle(sbi, GC_TIME)) {
> > > + wait_ms = f2fs_get_wait_time(sbi, GC_TIME);
> >
> > It seems this patch changes the method of increasing wait_ms here, if device is
> > busy, we may wake up GC thread earlier than before, not sure we should do this.
> >
> > To Jaegeuk, how do you think of this?
>
> Yes, please let us discuss this in another patch.
Sure, I will submit this in another patch for discussion.
--
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2018-09-12 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 3:47 [PATCH v2] f2fs: add new idle interval timing for discard and gc paths Sahitya Tummala
2018-09-10 16:01 ` [f2fs-dev] " Chao Yu
2018-09-11 22:09 ` Jaegeuk Kim
2018-09-12 8:27 ` Sahitya Tummala [this message]
2018-09-12 9:50 ` Chao Yu
2018-09-12 9:50 ` 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=20180912082740.GB22939@codeaurora.org \
--to=stummala@codeaurora.org \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--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.