1. 04 Dec, 2015 1 commit
  2. 12 Oct, 2015 1 commit
    • Chao Yu's avatar
      f2fs: export ra_nid_pages to sysfs · ea1a29a0
      Chao Yu authored
      
      
      After finishing building free nid cache, we will try to readahead
      asynchronously 4 more pages for the next reloading, the count of
      readahead nid pages is fixed.
      
      In some case, like SMR drive, read less sectors with fixed count
      each time we trigger RA may be low efficient, since we will face
      high seeking overhead, so we'd better let user to configure this
      parameter from sysfs in specific workload.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      ea1a29a0
  3. 09 Oct, 2015 3 commits
  4. 01 Sep, 2015 1 commit
  5. 20 Aug, 2015 1 commit
  6. 14 Aug, 2015 1 commit
    • Chao Yu's avatar
      f2fs: handle error of f2fs_iget correctly · 8c14bfad
      Chao Yu authored
      
      
      In recover_orphan_inode, whenever f2fs_iget fail, we will make kernel panic,
      but it's not reasonable, because f2fs_iget can fail due to a lot of reasons
      including out of memory.
      
      So we change error handling method as below:
      a) when finding no entry for the orphan inode, bug_on for catching bugs;
      b) for other reasons, report it to caller.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      8c14bfad
  7. 11 Aug, 2015 1 commit
    • Chao Yu's avatar
      f2fs: remove inmem radix tree · decd36b6
      Chao Yu authored
      Previously, we use radix tree to index all registered page entries for
      atomic file, but now we only use radix tree to see whether current page
      is indexed or not, since the other user of radix tree is gone in commit
      042b7816
      
       ("f2fs: remove unnecessary call to invalidate inmemory pages").
      
      So in this patch, we try to use one more efficient way:
      Introducing a macro ATOMIC_WRITTEN_PAGE, and setting it as page private
      value to indicate page indexing status. By using this way, we can save
      memory and lookup time.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      decd36b6
  8. 05 Aug, 2015 1 commit
    • Chao Yu's avatar
      f2fs: fix double lock in handle_failed_inode · 55f57d2c
      Chao Yu authored
      
      
      In handle_failed_inode, there is a potential deadlock which can happen
      in below call path:
      
      - f2fs_create
       - f2fs_lock_op   down_read(cp_rwsem)
       - f2fs_add_link
        - __f2fs_add_link
         - init_inode_metadata
          - f2fs_init_security    failed
          - truncate_blocks    failed
       - handle_failed_inode
        - f2fs_truncate
         - truncate_blocks(..,true)
      					- write_checkpoint
      					 - block_operations
      					  - f2fs_lock_all  down_write(cp_rwsem)
          - f2fs_lock_op   down_read(cp_rwsem)
      
      So in this path, we pass parameter to f2fs_truncate to make sure
      cp_rwsem in truncate_blocks will not be locked again.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      55f57d2c
  9. 04 Aug, 2015 4 commits
  10. 08 Jun, 2015 2 commits
  11. 01 Jun, 2015 5 commits
  12. 28 May, 2015 4 commits
  13. 04 May, 2015 1 commit
  14. 15 Apr, 2015 1 commit
  15. 10 Apr, 2015 4 commits
  16. 03 Mar, 2015 3 commits
    • Chao Yu's avatar
      f2fs: enable rb-tree extent cache · 1dcc336b
      Chao Yu authored
      
      
      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: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      1dcc336b
    • Chao Yu's avatar
      f2fs: add a mount option for rb-tree extent cache · 89672159
      Chao Yu authored
      
      
      This patch adds a mount option 'extent_cache' in f2fs.
      
      It is try to use a rb-tree based extent cache to cache more mapping information
      with less memory if this option is set, otherwise we will use the original one
      extent info cache.
      Suggested-by: default avatarChangman Lee <cm224.lee@samsung.com>
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      89672159
    • Chao Yu's avatar
      f2fs: move ext_lock out of struct extent_info · 0c872e2d
      Chao Yu authored
      
      
      Move ext_lock out of struct extent_info, then in the following patches we can
      use variables with struct extent_info type as a parameter to pass pure data.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      0c872e2d
  17. 12 Feb, 2015 6 commits