From: Josh Dener <denerjosh@yahoo.com>
To: Chao Yu <chao2.yu@samsung.com>, 'Jaegeuk Kim' <jaegeuk@kernel.org>
Cc: "linux-f2fs-devel@lists.sourceforge.net"
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: Reservation amount
Date: Wed, 21 Oct 2015 20:27:30 +0000 (UTC) [thread overview]
Message-ID: <1035949239.1178810.1445459250089.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <028101d10bc2$600e83e0$202b8ba0$@samsung.com>
Hi,
The explanation makes sense to me too, however I have two concerns:
* For this to work, you need to choose as victim the segment with the least valid blocks. But I think the search space is always limited by max_victim_search. So you can choose a bunch of segments with 99% valid blocks, even if there are segments with 1% valid blocks elsewhere.
* There should be a limit for the new fractional overprovisioning. With 0.01% OVP you don't need 20000 segments. ~1024 should always suffice (times segs_per_sec).
Thanks,
On Wednesday, October 21, 2015 5:36 AM, Chao Yu <chao2.yu@samsung.com> wrote:
> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Wednesday, October 21, 2015 2:32 AM
> To: Chao Yu
> Cc: 'Chao Yu'; linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] Reservation amount
>
> On Tue, Oct 20, 2015 at 11:31:45PM +0800, Chao Yu wrote:
> > Hi Jaegeuk,
> >
> > > -----Original Message-----
> > > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > > Sent: Tuesday, October 20, 2015 2:59 AM
> > > To: Chao Yu; Chao Yu
> > > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-f2fs-devel@lists.sourceforge.net
> > > Subject: Re: [f2fs-dev] Reservation amount
> > >
> > > Hello,
> > >
> > > On Mon, Oct 19, 2015 at 06:44:40PM +0800, Chao Yu wrote:
> > > > Hi Jaegeuk,
> > > >
> > > > > -----Original Message-----
> > > > > From: Josh Dener [mailto:denerjosh@yahoo.com]
> > > > > Sent: Sunday, October 18, 2015 12:58 PM
> > > > > To: linux-f2fs-devel@lists.sourceforge.net
> > > > > Subject: [f2fs-dev] Reservation amount
> > > > >
> > > > > Hi,
> > > > >
> > > > > Where does this formula come from?
> > > > >
> > > > >
> > > > > config.reserved_segments =
> > > > >
> > > > > (2 * (100 / config.overprovision + 1) + 6)
> > >
> > > What I've intended here was to handle the worst case of foreground gc.
> > > If a data segment is selected as a victim, all the valid data blocks would be
> > > migrated, resulting in producing a same number of dirty node blocks in the worse
> > > case. Then, checkpoint should write such the node blocks in order to reclaim the
> > > prefree segments accordingly. Therefore, we require x2 segments.
> > > 6 means the number of active segments, which is actually not a exact number
> > > though. :)
> >
> > Ah, I see, but one more thing is why using (100 / config.overprovision) as
> > the base segment number of reserved segments calculation? Let me guess, is
> > that not accurate too? the intention here is to balance in between ovp and
> > rsv segments number, not leading the (ovp + rsv) number higher? :)
>
> For example, if ovp is 20%, we select 5 victim segments to reclaim one free
> segment in the worst case. During this migration, we need additional 4 free
> segments to write valid blocks in the victim segments.
> Other remaining added segments are just to keep as a buffer to prepare any
> abnormal situation.
I can understand now, if ovp is 20%, in worst case, each potential victim
segment may contain ~4/5 * blk_per_seg valid blocks, so we will write all
blocks (4/5 * blk_per_seg * 5) of 5 selected victim segments to reserved
4 segments, eventually we can reclaim one free segment.
So actually '100 / config.overprovision' is used to calculate the victim
segment number which we can reclaim one free segment from in the worst case.
Thanks a lot for your explanation! :)
Thanks,
>
> Thanks,
>
> >
> > Thanks,
> >
> > >
> > > Thanks,
> > >
> > > >
> > > > I'm interest in this too, could you sharing more detail about policy
> > > > of overprovision and reserved space calculation?
> > > >
> > > > Thanks,
> > > >
> > > > >
> > > > >
> > > > > Is there a formal justification for it?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > ------------------------------------------------------------------------------
> > > > > _______________________________________________
> > > > > Linux-f2fs-devel mailing list
> > > > > Linux-f2fs-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> > >
> > > ------------------------------------------------------------------------------
> > > _______________________________________________
> > > Linux-f2fs-devel mailing list
> > > Linux-f2fs-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
next prev parent reply other threads:[~2015-10-21 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 4:58 Reservation amount Josh Dener
2015-10-19 10:44 ` Chao Yu
2015-10-19 18:59 ` Jaegeuk Kim
2015-10-20 15:31 ` Chao Yu
2015-10-20 18:32 ` Jaegeuk Kim
2015-10-21 5:35 ` Chao Yu
2015-10-21 20:27 ` Josh Dener [this message]
2015-10-21 21:12 ` Jaegeuk Kim
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=1035949239.1178810.1445459250089.JavaMail.yahoo@mail.yahoo.com \
--to=denerjosh@yahoo.com \
--cc=chao2.yu@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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