From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 3/3] f2fs: assign allocation hint for warm/cold data
Date: Tue, 18 Apr 2017 18:45:20 -0700 [thread overview]
Message-ID: <20170419014520.12536-3-jaegeuk@kernel.org> (raw)
In-Reply-To: <20170419014520.12536-1-jaegeuk@kernel.org>
This patch gives slower device region to warm/cold data area more eagerly.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/gc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index d988c1aaf132..eb1846a80da3 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1028,4 +1028,9 @@ void build_gc_manager(struct f2fs_sb_info *sbi)
sbi->fggc_threshold = div64_u64((main_count - ovp_count) *
BLKS_PER_SEC(sbi), (main_count - resv_count));
+
+ /* give warm/cold data area from slower device */
+ if (sbi->s_ndevs)
+ sbi->last_victim[ALLOC_NEXT] =
+ GET_SEGNO(sbi, FDEV(0).end_blk) + 1;
}
--
2.11.0
next prev parent reply other threads:[~2017-04-19 1:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 1:45 [PATCH 1/3] f2fs: add ioctl to flush data from faster device to cold area Jaegeuk Kim
2017-04-19 1:45 ` [PATCH 2/3] f2fs: fix _IOW usage Jaegeuk Kim
2017-04-19 1:45 ` Jaegeuk Kim [this message]
2017-04-22 1:11 ` [PATCH 1/3] f2fs: add ioctl to flush data from faster device to cold area Chao Yu
2017-04-24 19:59 ` [PATCH 1/3 v2] " 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=20170419014520.12536-3-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).