2012-11-29 13:28:09 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-07 16:19:08 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-19 22:19:30 +01:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 20:04:08 -08:00
|
|
|
|
2013-04-23 16:38:02 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
|
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-03 10:50:22 +09:00
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
|
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
2014-08-11 18:37:46 -07:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-01-24 09:42:16 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-30 11:19:05 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-15 18:01:10 +08:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2014-02-03 10:50:22 +09:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-29 14:37:22 -07:00
|
|
|
|
2014-12-24 16:08:14 +08:00
|
|
|
|
2014-10-29 14:37:22 -07:00
|
|
|
|
2014-12-24 16:08:14 +08:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2014-10-29 14:37:22 -07:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-22 14:57:23 +08:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-23 09:57:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
|
|
|
|
|
2014-03-22 14:57:23 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-24 16:08:14 +08:00
|
|
|
|
2014-12-17 20:04:08 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-03-22 14:57:23 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
|
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2014-09-22 16:21:07 -07:00
|
|
|
|
2013-12-20 17:39:59 +08:00
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2014-12-17 20:04:08 -08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
2014-03-22 14:57:23 +08:00
|
|
|
|
2014-12-24 16:08:14 +08:00
|
|
|
|
2013-11-30 12:51:14 +09:00
|
|
|
|
|
|
|
|
|
2012-11-29 13:28:09 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-10 07:26:14 +00:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-07-15 17:57:38 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-05 17:15:22 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-04-23 17:00:52 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2014-01-21 13:32:12 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-10 23:13:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
2013-11-10 23:13:18 +08:00
|
|
|
|
|
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
2013-11-10 23:13:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-22 20:56:10 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-09 10:34:38 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-22 20:56:10 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 23:08:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-06 14:44:32 +09:00
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-11-19 10:41:54 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: give a chance to merge IOs by IO scheduler
Previously, background GC submits many 4KB read requests to load victim blocks
and/or its (i)node blocks.
...
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb61, blkaddr = 0x3b964ed
f2fs_gc : block_rq_complete: 8,16 R () 499854968 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb6f, blkaddr = 0x3b964ee
f2fs_gc : block_rq_complete: 8,16 R () 499854976 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb79, blkaddr = 0x3b964ef
f2fs_gc : block_rq_complete: 8,16 R () 499854984 + 8 [0]
...
However, by the fact that many IOs are sequential, we can give a chance to merge
the IOs by IO scheduler.
In order to do that, let's use blk_plug.
...
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c6, blkaddr = 0x2e6ee
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c7, blkaddr = 0x2e6ef
<idle> : block_rq_complete: 8,16 R () 1519616 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1519848 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1520432 + 96 [0]
<idle> : block_rq_complete: 8,16 R () 1520536 + 104 [0]
<idle> : block_rq_complete: 8,16 R () 1521008 + 112 [0]
<idle> : block_rq_complete: 8,16 R () 1521440 + 152 [0]
<idle> : block_rq_complete: 8,16 R () 1521688 + 144 [0]
<idle> : block_rq_complete: 8,16 R () 1522128 + 192 [0]
<idle> : block_rq_complete: 8,16 R () 1523256 + 328 [0]
...
Note that this issue should be addressed in checkpoint, and some readahead
flows too.
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-24 13:19:56 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-26 13:10:46 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-04-29 17:35:10 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
2013-11-28 15:43:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f2fs: give a chance to merge IOs by IO scheduler
Previously, background GC submits many 4KB read requests to load victim blocks
and/or its (i)node blocks.
...
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb61, blkaddr = 0x3b964ed
f2fs_gc : block_rq_complete: 8,16 R () 499854968 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb6f, blkaddr = 0x3b964ee
f2fs_gc : block_rq_complete: 8,16 R () 499854976 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb79, blkaddr = 0x3b964ef
f2fs_gc : block_rq_complete: 8,16 R () 499854984 + 8 [0]
...
However, by the fact that many IOs are sequential, we can give a chance to merge
the IOs by IO scheduler.
In order to do that, let's use blk_plug.
...
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c6, blkaddr = 0x2e6ee
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c7, blkaddr = 0x2e6ef
<idle> : block_rq_complete: 8,16 R () 1519616 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1519848 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1520432 + 96 [0]
<idle> : block_rq_complete: 8,16 R () 1520536 + 104 [0]
<idle> : block_rq_complete: 8,16 R () 1521008 + 112 [0]
<idle> : block_rq_complete: 8,16 R () 1521440 + 152 [0]
<idle> : block_rq_complete: 8,16 R () 1521688 + 144 [0]
<idle> : block_rq_complete: 8,16 R () 1522128 + 192 [0]
<idle> : block_rq_complete: 8,16 R () 1523256 + 328 [0]
...
Note that this issue should be addressed in checkpoint, and some readahead
flows too.
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-24 13:19:56 +09:00
|
|
|
|
|
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
f2fs: give a chance to merge IOs by IO scheduler
Previously, background GC submits many 4KB read requests to load victim blocks
and/or its (i)node blocks.
...
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb61, blkaddr = 0x3b964ed
f2fs_gc : block_rq_complete: 8,16 R () 499854968 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb6f, blkaddr = 0x3b964ee
f2fs_gc : block_rq_complete: 8,16 R () 499854976 + 8 [0]
f2fs_gc : f2fs_readpage: ino = 1, page_index = 0xb79, blkaddr = 0x3b964ef
f2fs_gc : block_rq_complete: 8,16 R () 499854984 + 8 [0]
...
However, by the fact that many IOs are sequential, we can give a chance to merge
the IOs by IO scheduler.
In order to do that, let's use blk_plug.
...
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c6, blkaddr = 0x2e6ee
f2fs_gc : f2fs_iget: ino = 143
f2fs_gc : f2fs_readpage: ino = 143, page_index = 0x1c7, blkaddr = 0x2e6ef
<idle> : block_rq_complete: 8,16 R () 1519616 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1519848 + 8 [0]
<idle> : block_rq_complete: 8,16 R () 1520432 + 96 [0]
<idle> : block_rq_complete: 8,16 R () 1520536 + 104 [0]
<idle> : block_rq_complete: 8,16 R () 1521008 + 112 [0]
<idle> : block_rq_complete: 8,16 R () 1521440 + 152 [0]
<idle> : block_rq_complete: 8,16 R () 1521688 + 144 [0]
<idle> : block_rq_complete: 8,16 R () 1522128 + 192 [0]
<idle> : block_rq_complete: 8,16 R () 1523256 + 328 [0]
...
Note that this issue should be addressed in checkpoint, and some readahead
flows too.
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-24 13:19:56 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-29 13:28:09 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
2014-04-29 17:35:10 +09:00
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-02-26 13:10:46 +09:00
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-05-13 08:38:35 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-20 19:13:07 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
|
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-04-26 11:55:17 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-29 13:28:09 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2013-12-21 18:02:14 +08:00
|
|
|
|
|
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-05-20 09:55:50 +09:00
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
2013-11-10 23:13:18 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-04-26 11:55:17 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-04-26 11:55:17 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-07 22:08:23 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-12-27 17:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2014-09-15 19:32:16 -07:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
2015-01-05 16:02:20 -08:00
|
|
|
|
2014-09-15 19:32:16 -07:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-05 16:02:20 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
2014-12-30 23:12:11 -08:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2014-09-15 19:32:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-09 12:09:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-29 13:28:09 +09:00
|
|
|
|
2013-12-21 18:02:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-06-13 13:02:11 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-09 12:09:53 -08:00
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2013-12-26 16:55:22 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-23 16:38:02 +09:00
|
|
|
|
2014-06-13 13:02:11 +09:00
|
|
|
|
2013-12-26 16:55:22 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2015-02-09 10:34:38 -08:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-09 10:34:38 -08:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-26 19:59:52 +08:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-26 16:55:22 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-13 13:02:11 +09:00
|
|
|
|
2013-12-26 16:55:22 +09:00
|
|
|
|
|
|
|
|
|
2014-04-26 19:59:52 +08:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-06 23:22:50 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-06-13 13:02:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-08 04:30:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-13 13:02:11 +09:00
|
|
|
|
|
|
|
|
|
2014-06-08 04:30:14 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
2014-05-06 16:53:08 +08:00
|
|
|
|
|
|
|
|
|
2014-08-06 23:22:50 +09:00
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
|
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-26 13:10:46 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2013-06-13 16:59:29 +08:00
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2014-07-25 07:40:59 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
2014-12-30 22:57:55 -08:00
|
|
|
|
2014-07-25 07:40:59 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
|
|
|
|
|
2014-01-17 14:44:39 -06:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-05-06 16:48:26 +08:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-15 16:04:15 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2015-01-28 17:48:42 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-12-09 06:08:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-08-11 18:37:46 -07:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
|
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
2014-08-11 18:37:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2014-08-11 18:37:46 -07:00
|
|
|
|
|
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
f2fs: introduce a new global lock scheme
In the previous version, f2fs uses global locks according to the usage types,
such as directory operations, block allocation, block write, and so on.
Reference the following lock types in f2fs.h.
enum lock_type {
RENAME, /* for renaming operations */
DENTRY_OPS, /* for directory operations */
DATA_WRITE, /* for data write */
DATA_NEW, /* for data allocation */
DATA_TRUNC, /* for data truncate */
NODE_NEW, /* for node allocation */
NODE_TRUNC, /* for node truncate */
NODE_WRITE, /* for node write */
NR_LOCK_TYPE,
};
In that case, we lose the performance under the multi-threading environment,
since every types of operations must be conducted one at a time.
In order to address the problem, let's share the locks globally with a mutex
array regardless of any types.
So, let users grab a mutex and perform their jobs in parallel as much as
possbile.
For this, I propose a new global lock scheme as follows.
0. Data structure
- f2fs_sb_info -> mutex_lock[NR_GLOBAL_LOCKS]
- f2fs_sb_info -> node_write
1. mutex_lock_op(sbi)
- try to get an avaiable lock from the array.
- returns the index of the gottern lock variable.
2. mutex_unlock_op(sbi, index of the lock)
- unlock the given index of the lock.
3. mutex_lock_all(sbi)
- grab all the locks in the array before the checkpoint.
4. mutex_unlock_all(sbi)
- release all the locks in the array after checkpoint.
5. block_operations()
- call mutex_lock_all()
- sync_dirty_dir_inodes()
- grab node_write
- sync_node_pages()
Note that,
the pairs of mutex_lock_op()/mutex_unlock_op() and
mutex_lock_all()/mutex_unlock_all() should be used together.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-22 16:21:29 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-04-24 09:49:52 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-15 16:04:15 +09:00
|
|
|
|
2014-02-17 19:29:27 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-01-15 16:45:24 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-28 16:12:41 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2013-04-30 11:33:27 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-03-18 13:47:11 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-05-06 16:51:24 +08:00
|
|
|
|
|
|
|
|
|
2013-04-03 11:38:00 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-18 12:40:49 +09:00
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2014-04-16 10:47:06 +09:00
|
|
|
|
2014-03-18 13:43:05 +09:00
|
|
|
|
2014-03-18 12:40:49 +09:00
|
|
|
|
2014-03-18 13:47:11 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-04-30 11:33:27 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-04-30 11:33:27 +09:00
|
|
|
|
|
|
|
|
|
2013-01-15 16:45:24 +09:00
|
|
|
|
2013-04-30 11:33:27 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-11 13:54:01 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-18 13:47:11 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-03-18 13:43:05 +09:00
|
|
|
|
|
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2014-03-18 13:43:05 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-14 16:32:54 -07:00
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-02 15:31:18 -07:00
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-06 16:46:04 +08:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-11-25 10:59:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-26 11:55:17 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-30 09:22:45 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
f2fs: use rw_sem instead of fs_lock(locks mutex)
The fs_locks is used to block other ops(ex, recovery) when doing checkpoint.
And each other operate routine(besides checkpoint) needs to acquire a fs_lock,
there is a terrible problem here, if these are too many concurrency threads acquiring
fs_lock, so that they will block each other and may lead to some performance problem,
but this is not the phenomenon we want to see.
Though there are some optimization patches introduced to enhance the usage of fs_lock,
but the thorough solution is using a *rw_sem* to replace the fs_lock.
Checkpoint routine takes write_sem, and other ops take read_sem, so that we can block
other ops(ex, recovery) when doing checkpoint, and other ops will not disturb each other,
this can avoid the problem described above completely.
Because of the weakness of rw_sem, the above change may introduce a potential problem
that the checkpoint thread might get starved if other threads are intensively locking
the read semaphore for I/O.(Pointed out by Xu Jin)
In order to avoid this, a wait_list is introduced, the appending read semaphore ops
will be dropped into the wait_list if checkpoint thread is waiting for write semaphore,
and will be waked up when checkpoint thread gives up write semaphore.
Thanks to Kim's previous review and test, and will be very glad to see other guys'
performance tests about this patch.
V2:
-fix the potential starvation problem.
-use more suitable func name suggested by Xu Jin.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
[Jaegeuk Kim: adjust minor coding standard]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-09-27 18:08:30 +08:00
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-01 11:30:20 +08:00
|
|
|
|
|
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
2014-12-01 11:30:20 +08:00
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-25 10:59:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-10 23:13:18 +08:00
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
|
|
|
|
|
2014-11-17 16:14:11 -08:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-12-17 19:33:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 15:21:47 +02:00
|
|
|
|
|
|
|
|
|
2014-03-29 15:30:40 +08:00
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-12-06 15:00:58 +09:00
|
|
|
|
2013-04-26 11:55:17 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-03-08 21:29:23 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
2014-11-17 16:14:11 -08:00
|
|
|
|
|
|
|
|
|
2014-10-17 20:33:55 -07:00
|
|
|
|
|
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2013-06-27 13:04:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-06 16:47:23 +08:00
|
|
|
|
|
|
|
|
|
2014-10-09 13:19:53 -07:00
|
|
|
|
2013-06-27 13:04:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-16 14:15:59 +08:00
|
|
|
|
2013-06-27 13:04:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-26 20:15:09 +09:00
|
|
|
|
2014-03-16 18:07:34 -04:00
|
|
|
|
2013-12-26 20:15:09 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-16 18:07:34 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-26 20:15:09 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-03-04 21:27:34 -05:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-26 20:15:09 +09:00
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f2fs: handle inline data operations
Hook inline data read/write, truncate, fallocate, setattr, etc.
Files need meet following 2 requirement to inline:
1) file size is not greater than MAX_INLINE_DATA;
2) file doesn't pre-allocate data blocks by fallocate().
FI_INLINE_DATA will not be set while creating a new regular inode because
most of the files are bigger than ~3.4K. Set FI_INLINE_DATA only when
data is submitted to block layer, ranther than set it while creating a new
inode, this also avoids converting data from inline to normal data block
and vice versa.
While writting inline data to inode block, the first data block should be
released if the file has a block indexed by i_addr[0].
On the other hand, when a file operation is appied to a file with inline
data, we need to test if this file can remain inline by doing this
operation, otherwise it should be convert into normal file by reserving
a new data block, copying inline data to this new block and clear
FI_INLINE_DATA flag. Because reserve a new data block here will make use
of i_addr[0], if we save inline data in i_addr[0..872], then the first
4 bytes would be overwriten. This problem can be avoided simply by
not using i_addr[0] for inline data.
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-11-10 23:13:20 +08:00
|
|
|
|
2014-03-16 18:07:34 -04:00
|
|
|
|
2013-12-26 20:15:09 +09:00
|
|
|
|
|
|
|
|
|
2014-07-31 21:11:22 +08:00
|
|
|
|
|
|
|
|
|
2015-02-09 12:09:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-31 21:11:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-02 13:25:04 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
|
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
|
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2015-01-30 11:39:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-03-14 09:24:32 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-24 17:53:29 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2014-10-09 13:19:53 -07:00
|
|
|
|
2014-12-09 06:08:59 -08:00
|
|
|
|
2014-10-09 13:19:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-21 13:32:12 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
2014-09-12 15:53:45 -07:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-17 20:30:23 +09:00
|
|
|
|
|
|
|
|
|
2014-04-22 13:34:01 +08:00
|
|
|
|
|
|
|
|
|
2014-10-23 19:48:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-16 19:04:05 +09:00
|
|
|
|
2013-01-17 20:30:23 +09:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-27 13:04:08 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2015-02-05 17:44:29 +08:00
|
|
|
|
|
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|
2013-01-17 20:30:23 +09:00
|
|
|
|
2012-11-02 17:10:12 +09:00
|
|
|
|