From: Namjae Jeon <linkinjeon@gmail.com>
To: jaegeuk.kim@samsung.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Namjae Jeon <linkinjeon@gmail.com>,
Namjae Jeon <namjae.jeon@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>
Subject: [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func
Date: Sat, 2 Feb 2013 23:52:13 +0900 [thread overview]
Message-ID: <1359816733-16286-1-git-send-email-linkinjeon@gmail.com> (raw)
From: Namjae Jeon <namjae.jeon@samsung.com>
When GC thread is running continously there is no need to call
f2fs_balance_fs unconditinally for garbage collection, instead
the garbage collection will be taken via. calling f2fs_gc in the
thread. So, we can move out the balance out of thread loop and
make it run initially when the thread is started.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
---
fs/f2fs/gc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 375e69e..66ac6ad 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -34,6 +34,8 @@ static int gc_thread_func(void *data)
wait_ms = GC_THREAD_MIN_SLEEP_TIME;
+ f2fs_balance_fs(sbi);
+
do {
if (try_to_freeze())
continue;
@@ -49,7 +51,6 @@ static int gc_thread_func(void *data)
continue;
}
- f2fs_balance_fs(sbi);
if (!test_opt(sbi, BG_GC))
continue;
--
1.7.9.5
next reply other threads:[~2013-02-02 14:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 14:52 Namjae Jeon [this message]
2013-02-04 1:36 ` [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func Changman Lee
2013-02-04 2:01 ` Namjae Jeon
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=1359816733-16286-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=a.sahrawat@samsung.com \
--cc=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.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 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).