1. 29 5月, 2015 1 次提交
  2. 11 4月, 2015 4 次提交
  3. 04 3月, 2015 1 次提交
    • C
      f2fs: enable rb-tree extent cache · 1dcc336b
      Chao Yu 提交于
      This patch enables rb-tree based extent cache in f2fs.
      
      When we mount with "-o extent_cache", f2fs will try to add recently accessed
      page-block mappings into rb-tree based extent cache as much as possible, instead
      of original one extent info cache.
      
      By this way, f2fs can support more effective cache between dnode page cache and
      disk. It will supply high hit ratio in the cache with fewer memory when dnode
      page cache are reclaimed in environment of low memory.
      
      Storage: Sandisk sd card 64g
      1.append write file (offset: 0, size: 128M);
      2.override write file (offset: 2M, size: 1M);
      3.override write file (offset: 4M, size: 1M);
      ...
      4.override write file (offset: 48M, size: 1M);
      ...
      5.override write file (offset: 112M, size: 1M);
      6.sync
      7.echo 3 > /proc/sys/vm/drop_caches
      8.read file (size:128M, unit: 4k, count: 32768)
      (time dd if=/mnt/f2fs/128m bs=4k count=32768)
      
      Extent Hit Ratio:
      		before		patched
      Hit Ratio	121 / 1071	1071 / 1071
      
      Performance:
      		before		patched
      real    	0m37.051s	0m35.556s
      user    	0m0.040s	0m0.026s
      sys     	0m2.990s	0m2.251s
      
      Memory Cost:
      		before		patched
      Tree Count:	0		1 (size: 24 bytes)
      Node Count:	0		45 (size: 1440 bytes)
      
      v3:
       o retest and given more details of test result.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1dcc336b
  4. 12 2月, 2015 5 次提交
  5. 10 1月, 2015 11 次提交
  6. 09 12月, 2014 3 次提交
  7. 24 11月, 2014 2 次提交
  8. 07 11月, 2014 1 次提交
  9. 06 11月, 2014 1 次提交
  10. 05 11月, 2014 1 次提交
  11. 04 11月, 2014 8 次提交
  12. 07 10月, 2014 1 次提交
    • J
      f2fs: support atomic writes · 88b88a66
      Jaegeuk Kim 提交于
      This patch introduces a very limited functionality for atomic write support.
      In order to support atomic write, this patch adds two ioctls:
       o F2FS_IOC_START_ATOMIC_WRITE
       o F2FS_IOC_COMMIT_ATOMIC_WRITE
      
      The database engine should be aware of the following sequence.
      1. open
       -> ioctl(F2FS_IOC_START_ATOMIC_WRITE);
      2. writes
        : all the written data will be treated as atomic pages.
      3. commit
       -> ioctl(F2FS_IOC_COMMIT_ATOMIC_WRITE);
        : this flushes all the data blocks to the disk, which will be shown all or
        nothing by f2fs recovery procedure.
      4. repeat to #2.
      
      The IO pattens should be:
      
        ,- START_ATOMIC_WRITE                  ,- COMMIT_ATOMIC_WRITE
       CP | D D D D D D | FSYNC | D D D D | FSYNC ...
                            `- COMMIT_ATOMIC_WRITE
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      88b88a66
  13. 01 10月, 2014 1 次提交
    • J
      f2fs: check the use of macros on block counts and addresses · 7cd8558b
      Jaegeuk Kim 提交于
      This patch cleans up the existing and new macros for readability.
      
      Rule is like this.
      
               ,-----------------------------------------> MAX_BLKADDR -,
               |  ,------------- TOTAL_BLKS ----------------------------,
               |  |                                                     |
               |  ,- seg0_blkaddr   ,----- sit/nat/ssa/main blkaddress  |
      block    |  | (SEG0_BLKADDR)  | | | |   (e.g., MAIN_BLKADDR)      |
      address  0..x................ a b c d .............................
                  |                                                     |
      global seg# 0...................... m .............................
                  |                       |                             |
                  |                       `------- MAIN_SEGS -----------'
                  `-------------- TOTAL_SEGS ---------------------------'
                                          |                             |
       seg#                               0..........xx..................
      
      = Note =
       o GET_SEGNO_FROM_SEG0 : blk address -> global segno
       o GET_SEGNO           : blk address -> segno
       o START_BLOCK         : segno -> starting block address
      Reviewed-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      7cd8558b