1. 16 9月, 2014 1 次提交
    • J
      f2fs: give an option to enable in-place-updates during fsync to users · c1ce1b02
      Jaegeuk Kim 提交于
      If user wrote F2FS_IPU_FSYNC:4 in /sys/fs/f2fs/ipu_policy, f2fs_sync_file
      only starts to try in-place-updates.
      And, if the number of dirty pages is over /sys/fs/f2fs/min_fsync_blocks, it
      keeps out-of-order manner. Otherwise, it triggers in-place-updates.
      
      This may be used by storage showing very high random write performance.
      
      For example, it can be used when,
      
      Seq. writes (Data) + wait + Seq. writes (Node)
      
      is pretty much slower than,
      
      Rand. writes (Data)
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      c1ce1b02
  2. 10 9月, 2014 6 次提交
    • G
      f2fs: use lock-less list(llist) to simplify the flush cmd management · 721bd4d5
      Gu Zheng 提交于
      We use flush cmd control to collect many flush cmds, and flush them
      together. In this case, we use two list to manage the flush cmds
      (collect and dispatch), and one spin lock is used to protect this.
      In fact, the lock-less list(llist) is very suitable to this case,
      and we use simplify this routine.
      
      -
      v2:
      -use llist_for_each_entry_safe to fix possible use-after-free issue.
      -remove the unused field from struct flush_cmd.
      Thanks for Yu's suggestion.
      -
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      721bd4d5
    • C
      f2fs: refactor flush_sit_entries codes for reducing SIT writes · 184a5cd2
      Chao Yu 提交于
      In commit aec71382 ("f2fs: refactor flush_nat_entries codes for reducing NAT
      writes"), we descripte the issue as below:
      
      "Although building NAT journal in cursum reduce the read/write work for NAT
      block, but previous design leave us lower performance when write checkpoint
      frequently for these cases:
      1. if journal in cursum has already full, it's a bit of waste that we flush all
         nat entries to page for persistence, but not to cache any entries.
      2. if journal in cursum is not full, we fill nat entries to journal util
         journal is full, then flush the left dirty entries to disk without merge
         journaled entries, so these journaled entries may be flushed to disk at next
         checkpoint but lost chance to flushed last time."
      
      Actually, we have the same problem in using SIT journal area.
      
      In this patch, firstly we will update sit journal with dirty entries as many as
      possible. Secondly if there is no space in sit journal, we will remove all
      entries in journal and walk through the whole dirty entry bitmap of sit,
      accounting dirty sit entries located in same SIT block to sit entry set. All
      entry sets are linked to list sit_entry_set in sm_info, sorted ascending order
      by count of entries in set. Later we flush entries in set which have fewest
      entries into journal as many as we can, and then flush dense set with merged
      entries to disk.
      
      In this way we can use sit journal area more effectively, also we will reduce
      SIT update, result in gaining in performance and saving lifetime of flash
      device.
      
      In my testing environment, it shows this patch can help to reduce SIT block
      update obviously.
      
      virtual machine + hard disk:
      fsstress -p 20 -n 400 -l 5
      		sit page num	cp count	sit pages/cp
      based		2006.50		1349.75		1.486
      patched		1566.25		1463.25		1.070
      
      Our latency of merging op is small when handling a great number of dirty SIT
      entries in flush_sit_entries:
      latency(ns)	dirty sit count
      36038		2151
      49168		2123
      37174		2232
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      184a5cd2
    • C
      f2fs: remove unneeded sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO · d3a14afd
      Chao Yu 提交于
      sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO is not used, remove it.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d3a14afd
    • J
      f2fs: handle bug cases by letting fsck.f2fs initiate · ec325b52
      Jaegeuk Kim 提交于
      This patch adds to handle corner buggy cases for fsck.f2fs.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ec325b52
    • J
      f2fs: add BUG cases to initiate fsck.f2fs · 05796763
      Jaegeuk Kim 提交于
      This patch replaces BUG cases with f2fs_bug_on to remain fsck.f2fs information.
      And it implements some void functions to initiate fsck.f2fs too.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      05796763
    • J
      f2fs: need fsck.f2fs when f2fs_bug_on is triggered · 9850cf4a
      Jaegeuk Kim 提交于
      If any f2fs_bug_on is triggered, fsck.f2fs is needed.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      9850cf4a
  3. 04 9月, 2014 1 次提交
  4. 22 8月, 2014 1 次提交
    • J
      f2fs: remove rewrite_node_page · 202095a7
      Jaegeuk Kim 提交于
      I think we need to let the dirty node pages remain in the page cache instead
      of rewriting them in their places.
      So, after done with successful recovery, write_checkpoint will flush all of them
      through the normal write path.
      Through this, we can avoid potential error cases in terms of block allocation.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      202095a7
  5. 20 8月, 2014 1 次提交
  6. 05 8月, 2014 1 次提交
  7. 31 7月, 2014 3 次提交
    • D
      f2fs: remove redundant lines in allocate_data_block · 33be828a
      Dongho Sim 提交于
      There are redundant lines in allocate_data_block.
      
      In this function, we call refresh_sit_entry with old seg and old curseg.
      After that, we call locate_dirty_segment with old curseg.
      
      But, the new address is always allocated from old curseg and
      we call locate_dirty_segment with old curseg in refresh_sit_entry.
      So, we do not need to call locate_dirty_segment with old curseg again.
      
      We've discussed like below:
      
      Jaegeuk said:
       "When considering SSR, we need to take care of the following scenario.
        - old segno : X
        - new address : Z
        - old curseg : Y
        This means, a new block is supposed to be written to Z from X.
        And Z is newly allocated in the same path from Y.
      
        In that case, we should trigger locate_dirty_segment for Y, since
        it was a current_segment and can be dirty owing to SSR.
        But that was not included in the dirty list."
      
      Changman said:
       "We already choosed old curseg(Y) and then we allocate new address(Z) from old
        curseg(Y). After that we call refresh_sit_entry(old address, new address).
        In the funcation, we call locate_dirty_segment with old seg and old curseg.
        So calling locate_dirty_segment after refresh_sit_entry again is redundant."
      
      Jaegeuk said:
       "Right. The new address is always allocated from old_curseg."
      Reviewed-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NDongho Sim <dh.sim@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      33be828a
    • J
      f2fs: add tracepoint for f2fs_issue_flush · 24a9ee0f
      Jaegeuk Kim 提交于
      This patch adds a tracepoint for f2fs_issue_flush.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      24a9ee0f
    • J
      f2fs: avoid retrying wrong recovery routine when error was occurred · cf2271e7
      Jaegeuk Kim 提交于
      This patch eliminates the propagation of recovery errors to the next mount.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      cf2271e7
  8. 29 7月, 2014 1 次提交
  9. 10 7月, 2014 2 次提交
  10. 09 7月, 2014 2 次提交
  11. 08 5月, 2014 1 次提交
  12. 07 5月, 2014 7 次提交
  13. 07 4月, 2014 1 次提交
    • J
      f2fs: introduce f2fs_issue_flush to avoid redundant flush issue · 6b4afdd7
      Jaegeuk Kim 提交于
      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: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      6b4afdd7
  14. 02 4月, 2014 2 次提交
  15. 01 4月, 2014 1 次提交
  16. 20 3月, 2014 1 次提交
  17. 18 3月, 2014 1 次提交
  18. 10 3月, 2014 2 次提交
  19. 17 2月, 2014 3 次提交
  20. 22 1月, 2014 1 次提交
  21. 20 1月, 2014 1 次提交