1. 07 Apr, 2014 1 commit
    • Jaegeuk Kim's avatar
      f2fs: introduce f2fs_issue_flush to avoid redundant flush issue · 6b4afdd7
      Jaegeuk Kim authored
      Some storage devices show relatively high latencies to complete cache_flush
      commands, even though their normal IO speed is prettry much high. In such
      the case, it needs to merge cache_flush commands as much as possible to avoid
      issuing them redundantly.
      So, this patch introduces a mount option, "-o flush_merge", to mitigate such
      the overhead.
      
      If this option is enabled by user, F2FS merges the cache_flush commands and then
      issues just one cache_flush on behalf of them. Once the single command is
      finished, F2FS sends a completion signal to all the pending threads.
      
      Note that, this option can be used under a workload consisting of very intensive
      concurrent fsync calls, while the storage handles cache_flush commands slowly.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      6b4afdd7
  2. 02 Apr, 2014 4 commits
  3. 01 Apr, 2014 3 commits
  4. 20 Mar, 2014 9 commits
  5. 18 Mar, 2014 8 commits
  6. 12 Mar, 2014 2 commits
  7. 11 Mar, 2014 1 commit
  8. 10 Mar, 2014 4 commits
  9. 05 Mar, 2014 1 commit
  10. 03 Mar, 2014 1 commit
  11. 28 Feb, 2014 1 commit
    • Chao Yu's avatar
      f2fs: fix dirty page accounting when redirty · 9cf3c389
      Chao Yu authored
      We should de-account dirty counters for page when redirty in ->writepage().
      
      Wu Fengguang described in 'commit 971767ca':
      "writeback: fix dirtied pages accounting on redirty
      De-account the accumulative dirty counters on page redirty.
      
      Page redirties (very common in ext4) will introduce mismatch between
      counters (a) and (b)
      
      a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied
      b) NR_WRITTEN, BDI_WRITTEN
      
      This will introduce systematic errors in balanced_rate and result in
      dirty page position errors (ie. the dirty pages are no longer balanced
      around the global/bdi setpoints)."
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      9cf3c389
  12. 27 Feb, 2014 5 commits
    • Chao Yu's avatar
      f2fs: use existing macro to clean up some codes · 695fd1ed
      Chao Yu authored
      This patch use existing macro F2FS_INODE/NEXT_FREE_BLKADDR to clean up some
      codes.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      695fd1ed
    • Chao Yu's avatar
      f2fs: readahead contiguous SSA blocks for f2fs_gc · 81c1a0f1
      Chao Yu authored
      If there are multi segments in one section, we will read those SSA blocks which
      have contiguous address one by one in f2fs_gc. It may lost performance, let's
      read ahead SSA blocks by merge multi read request.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      81c1a0f1
    • Jaegeuk Kim's avatar
      f2fs: add an sysfs entry to control the directory level · ab9fa662
      Jaegeuk Kim authored
      This patch adds an sysfs entry to control dir_level used by the large directory.
      
      The description of this entry is:
      
       dir_level                    This parameter controls the directory level to
      			      support large directory. If a directory has a
      			      number of files, it can reduce the file lookup
      			      latency by increasing this dir_level value.
      			      Otherwise, it needs to decrease this value to
      			      reduce the space overhead. The default value is 0.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      ab9fa662
    • Jaegeuk Kim's avatar
      f2fs: introduce large directory support · 38431545
      Jaegeuk Kim authored
      This patch introduces an i_dir_level field to support large directory.
      
      Previously, f2fs maintains multi-level hash tables to find a dentry quickly
      from a bunch of chiild dentries in a directory, and the hash tables consist of
      the following tree structure as below.
      
      In Documentation/filesystems/f2fs.txt,
      
      ----------------------
      A : bucket
      B : block
      N : MAX_DIR_HASH_DEPTH
      ----------------------
      
      level #0   | A(2B)
                 |
      level #1   | A(2B) - A(2B)
                 |
      level #2   | A(2B) - A(2B) - A(2B) - A(2B)
           .     |   .       .       .       .
      level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
      
      But, if we can guess that a directory will handle a number of child files,
      we don't need to traverse the tree from level #0 to #N all the time.
      Since the lower level tables contain relatively small number of dentries,
      the miss ratio of the target dentry is likely to be high.
      
      In order to avoid that, we can configure the hash tables sparsely from level #0
      like this.
      
      level #0   | A(2B) - A(2B) - A(2B) - A(2B)
      
      level #1   | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
           .     |   .       .       .       .
      level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
      
      With this structure, we can skip the ineffective tree searches in lower level
      hash tables.
      
      This patch adds just a facility for this by introducing i_dir_level in
      f2fs_inode.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      38431545
    • Jaegeuk Kim's avatar
      f2fs: remove costly bit operations for f2fs_find_entry · 5d0c6671
      Jaegeuk Kim authored
      It turns out that a bit operation like find_next_bit is not always fast enough
      for f2fs_find_entry.
      Instead, it is pretty much simple and fast to traverse each dentries.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      5d0c6671