<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/f2fs/gc.c, branch v4.1.18</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>f2fs: add stat info for moved blocks by background gc</title>
<updated>2015-04-10T22:08:32+00:00</updated>
<author>
<name>Changman Lee</name>
<email>cm224.lee@samsung.com</email>
</author>
<published>2014-12-22T23:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1235983e385afafb33bab3578bfc83a7d871ce1'/>
<id>e1235983e385afafb33bab3578bfc83a7d871ce1</id>
<content type='text'>
This patch is for looking into gc performance of f2fs in detail.

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
[Jaegeuk Kim: fix build errors]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is for looking into gc performance of f2fs in detail.

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
[Jaegeuk Kim: fix build errors]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: split UMOUNT and FASTBOOT flags</title>
<updated>2015-02-12T01:04:41+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2015-01-29T19:45:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=119ee9144534141822462e3e8a5ccc8dc537f712'/>
<id>119ee9144534141822462e3e8a5ccc8dc537f712</id>
<content type='text'>
This patch adds FASTBOOT flag into checkpoint as follows.

 - CP_UMOUNT_FLAG is set when system is umounted.
 - CP_FASTBOOT_FLAG is set when intermediate checkpoint having node summaries
   was done.

So, if you get CP_UMOUNT_FLAG from checkpoint, the system was umounted cleanly.
Instead, if there was sudden-power-off, you can get CP_FASTBOOT_FLAG or nothing.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds FASTBOOT flag into checkpoint as follows.

 - CP_UMOUNT_FLAG is set when system is umounted.
 - CP_FASTBOOT_FLAG is set when intermediate checkpoint having node summaries
   was done.

So, if you get CP_UMOUNT_FLAG from checkpoint, the system was umounted cleanly.
Instead, if there was sudden-power-off, you can get CP_FASTBOOT_FLAG or nothing.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: clean up {in,de}create_sleep_time</title>
<updated>2015-02-12T01:04:37+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2015-01-26T12:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88dd8934194f6d1db7f824c03d1eee169cb891b0'/>
<id>88dd8934194f6d1db7f824c03d1eee169cb891b0</id>
<content type='text'>
Use pointer parameter @wait to pass result in {in,de}create_sleep_time for
cleanup.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use pointer parameter @wait to pass result in {in,de}create_sleep_time for
cleanup.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: use f2fs_radix_tree_insert to clean codes</title>
<updated>2015-02-12T01:04:35+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2015-01-23T12:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f28e503429644a794d9bf2793189ff0b0887eb21'/>
<id>f28e503429644a794d9bf2793189ff0b0887eb21</id>
<content type='text'>
No modification in functionality, just clean codes with f2fs_radix_tree_insert.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No modification in functionality, just clean codes with f2fs_radix_tree_insert.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: reuse inode_entry_slab in gc procedure for using slab more effectively</title>
<updated>2015-01-10T01:02:26+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2014-12-29T07:56:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=062920734c0de9dd4f0a9bdc36fdcabc2751eb34'/>
<id>062920734c0de9dd4f0a9bdc36fdcabc2751eb34</id>
<content type='text'>
There are two slab cache inode_entry_slab and winode_slab using the same
structure as below:

struct dir_inode_entry {
	struct list_head list;	/* list head */
	struct inode *inode;	/* vfs inode pointer */
};

struct inode_entry {
	struct list_head list;
	struct inode *inode;
};

It's a little waste that the two cache can not share their memory space for each
other.
So in this patch we remove one redundant winode_slab slab cache, then use more
universal name struct inode_entry as remaining data structure name of slab,
finally we reuse the inode_entry_slab to store dirty dir item and gc item for
more effective.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two slab cache inode_entry_slab and winode_slab using the same
structure as below:

struct dir_inode_entry {
	struct list_head list;	/* list head */
	struct inode *inode;	/* vfs inode pointer */
};

struct inode_entry {
	struct list_head list;
	struct inode *inode;
};

It's a little waste that the two cache can not share their memory space for each
other.
So in this patch we remove one redundant winode_slab slab cache, then use more
universal name struct inode_entry as remaining data structure name of slab,
finally we reuse the inode_entry_slab to store dirty dir item and gc item for
more effective.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: do retry operations with cond_resched</title>
<updated>2014-12-08T18:35:05+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2014-12-05T18:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9be32d72becca41d7d9b010d7d9be1d39489414f'/>
<id>9be32d72becca41d7d9b010d7d9be1d39489414f</id>
<content type='text'>
This patch revists retrial paths in f2fs.
The basic idea is to use cond_resched instead of retrying from the very early
stage.

Suggested-by: Gu Zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch revists retrial paths in f2fs.
The basic idea is to use cond_resched instead of retrying from the very early
stage.

Suggested-by: Gu Zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: call radix_tree_preload before radix_tree_insert</title>
<updated>2014-12-05T17:51:04+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2014-12-04T04:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=769ec6e5b7d4a8115447736871be8bffaaba3a7d'/>
<id>769ec6e5b7d4a8115447736871be8bffaaba3a7d</id>
<content type='text'>
This patch tries to fix:

 BUG: using smp_processor_id() in preemptible [00000000] code: f2fs_gc-254:0/384
  (radix_tree_node_alloc+0x14/0x74) from [&lt;c033d8a0&gt;] (radix_tree_insert+0x110/0x200)
  (radix_tree_insert+0x110/0x200) from [&lt;c02e8264&gt;] (gc_data_segment+0x340/0x52c)
  (gc_data_segment+0x340/0x52c) from [&lt;c02e8658&gt;] (f2fs_gc+0x208/0x400)
  (f2fs_gc+0x208/0x400) from [&lt;c02e8a98&gt;] (gc_thread_func+0x248/0x28c)
  (gc_thread_func+0x248/0x28c) from [&lt;c0139944&gt;] (kthread+0xa0/0xac)
  (kthread+0xa0/0xac) from [&lt;c0105ef8&gt;] (ret_from_fork+0x14/0x3c)

The reason is that f2fs calls radix_tree_insert under enabled preemption.
So, before calling it, we need to call radix_tree_preload.

Otherwise, we should use _GFP_WAIT for the radix tree, and use mutex or
semaphore to cover the radix tree operations.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch tries to fix:

 BUG: using smp_processor_id() in preemptible [00000000] code: f2fs_gc-254:0/384
  (radix_tree_node_alloc+0x14/0x74) from [&lt;c033d8a0&gt;] (radix_tree_insert+0x110/0x200)
  (radix_tree_insert+0x110/0x200) from [&lt;c02e8264&gt;] (gc_data_segment+0x340/0x52c)
  (gc_data_segment+0x340/0x52c) from [&lt;c02e8658&gt;] (f2fs_gc+0x208/0x400)
  (f2fs_gc+0x208/0x400) from [&lt;c02e8a98&gt;] (gc_thread_func+0x248/0x28c)
  (gc_thread_func+0x248/0x28c) from [&lt;c0139944&gt;] (kthread+0xa0/0xac)
  (kthread+0xa0/0xac) from [&lt;c0105ef8&gt;] (ret_from_fork+0x14/0x3c)

The reason is that f2fs calls radix_tree_insert under enabled preemption.
So, before calling it, we need to call radix_tree_preload.

Otherwise, we should use _GFP_WAIT for the radix tree, and use mutex or
semaphore to cover the radix tree operations.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: more fast lookup for gc_inode list</title>
<updated>2014-12-02T19:02:50+00:00</updated>
<author>
<name>Changman Lee</name>
<email>cm224.lee@samsung.com</email>
</author>
<published>2014-11-28T15:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dda2af83b2b7593458828d4f15443167b3da8c4'/>
<id>7dda2af83b2b7593458828d4f15443167b3da8c4</id>
<content type='text'>
If there are many inodes that have data blocks in victim segment,
it takes long time to find a inode in gc_inode list.
Let's use radix_tree to reduce lookup time.

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there are many inodes that have data blocks in victim segment,
it takes long time to find a inode in gc_inode list.
Let's use radix_tree to reduce lookup time.

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: cleanup if-statement of phase in gc_data_segment</title>
<updated>2014-11-28T04:30:17+00:00</updated>
<author>
<name>Changman Lee</name>
<email>cm224.lee@samsung.com</email>
</author>
<published>2014-11-27T07:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=31a3268839c1aa808a5109111ec847b95e1bb114'/>
<id>31a3268839c1aa808a5109111ec847b95e1bb114</id>
<content type='text'>
Little cleanup to distinguish each phase easily

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
[Jaegeuk Kim: modify indentation for code readability]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Little cleanup to distinguish each phase easily

Signed-off-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
[Jaegeuk Kim: modify indentation for code readability]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: avoid unable to restart gc thread in remount</title>
<updated>2014-11-20T06:49:30+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2014-11-18T03:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c0299320318c8154a20a3d9e73cbd1fc58d96e1'/>
<id>6c0299320318c8154a20a3d9e73cbd1fc58d96e1</id>
<content type='text'>
In f2fs_remount, we will stop gc thread and set need_restart_gc as true when new
option is set without BG_GC, then if any error occurred in the following
procedure, we can restore to start the gc thread.
But after that, We will fail to restore gc thread in start_gc_thread as BG_GC is
not set in new option, so we'd better move this condition judgment out of
start_gc_thread to fix this issue.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In f2fs_remount, we will stop gc thread and set need_restart_gc as true when new
option is set without BG_GC, then if any error occurred in the following
procedure, we can restore to start the gc thread.
But after that, We will fail to restore gc thread in start_gc_thread as BG_GC is
not set in new option, so we'd better move this condition judgment out of
start_gc_thread to fix this issue.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
