1. 24 11月, 2016 3 次提交
  2. 01 10月, 2016 3 次提交
    • C
      f2fs: fix to commit bio cache after flushing node pages · 3f5f4959
      Chao Yu 提交于
      In sync_node_pages, we won't check and commit last merged pages in private
      bio cache of f2fs, as these pages were taged as writeback, someone who is
      waiting for writebacking of the page will be blocked until the cache was
      committed by someone else.
      
      We need to commit node type bio cache to avoid potential deadlock or long
      delay of waiting writeback.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      3f5f4959
    • C
      f2fs: support configuring fault injection per superblock · 1ecc0c5c
      Chao Yu 提交于
      Previously, we only support global fault injection configuration, so that
      when we configure type/rate of fault injection through sysfs, mount
      option, it will influence all f2fs partition which is being used.
      
      It is not make sence, since it will be not convenient if developer want
      to test separated partitions with different fault injection rate/type
      simultaneously, also it's not possible to enable fault injection in one
      partition and disable fault injection in other one.
      
      >From now on, we move global configuration of fault injection in module
      into per-superblock, hence injection testing can be more flexible.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1ecc0c5c
    • W
      f2fs: add customized migrate_page callback · 5b7a487c
      Weichao Guo 提交于
      This patch improves the migration of dirty pages and allows migrating atomic
      written pages that F2FS uses in Page Cache. Instead of the fallback releasing
      page path, it provides better performance for memory compaction, CMA and other
      users of memory page migrating. For dirty pages, there is no need to write back
      first when migrating. For an atomic written page before committing, we can
      migrate the page and update the related 'inmem_pages' list at the same time.
      Signed-off-by: NWeichao Guo <guoweichao@huawei.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      [Jaegeuk Kim: fix some coding style]
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      5b7a487c
  3. 16 9月, 2016 1 次提交
  4. 14 9月, 2016 1 次提交
  5. 30 8月, 2016 1 次提交
  6. 19 8月, 2016 1 次提交
  7. 21 7月, 2016 1 次提交
  8. 16 7月, 2016 2 次提交
  9. 09 7月, 2016 5 次提交
  10. 07 7月, 2016 1 次提交
  11. 08 6月, 2016 2 次提交
  12. 03 6月, 2016 6 次提交
  13. 21 5月, 2016 1 次提交
    • C
      f2fs: fix to update dirty page count correctly · 0f3311a8
      Chao Yu 提交于
      Once we failed to merge inline data into inode page during flushing inline
      inode, we will skip invoking inode_dec_dirty_pages, which makes dirty page
      count incorrect, result in panic in ->evict_inode, Fix it.
      
      ------------[ cut here ]------------
      kernel BUG at /home/yuchao/git/devf2fs/inode.c:336!
      invalid opcode: 0000 [#1] PREEMPT SMP
      CPU: 3 PID: 10004 Comm: umount Tainted: G           O    4.6.0-rc5+ #17
      Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
      task: f0c33000 ti: c5212000 task.ti: c5212000
      EIP: 0060:[<f89aacb5>] EFLAGS: 00010202 CPU: 3
      EIP is at f2fs_evict_inode+0x85/0x490 [f2fs]
      EAX: 00000001 EBX: c4529ea0 ECX: 00000001 EDX: 00000000
      ESI: c0131000 EDI: f89dd0a0 EBP: c5213e9c ESP: c5213e78
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      CR0: 80050033 CR2: b75878c0 CR3: 1a36a700 CR4: 000406f0
      Stack:
       c4529ea0 c4529ef4 c5213e8c c176d45c c4529ef4 00000000 c4529ea0 c4529fac
       f89dd0a0 c5213eb0 c1204a68 c5213ed8 c452a2b4 c6680930 c5213ec0 c1204b64
       c6680d44 c6680620 c5213eec c120588d ee84b000 ee84b5c0 c5214000 ee84b5e0
      Call Trace:
       [<c176d45c>] ? _raw_spin_unlock+0x2c/0x50
       [<c1204a68>] evict+0xa8/0x170
       [<c1204b64>] dispose_list+0x34/0x50
       [<c120588d>] evict_inodes+0x10d/0x130
       [<c11ea941>] generic_shutdown_super+0x41/0xe0
       [<c1185190>] ? unregister_shrinker+0x40/0x50
       [<c1185190>] ? unregister_shrinker+0x40/0x50
       [<c11eac52>] kill_block_super+0x22/0x70
       [<f89af23e>] kill_f2fs_super+0x1e/0x20 [f2fs]
       [<c11eae1d>] deactivate_locked_super+0x3d/0x70
       [<c11eb383>] deactivate_super+0x43/0x60
       [<c1208ec9>] cleanup_mnt+0x39/0x80
       [<c1208f50>] __cleanup_mnt+0x10/0x20
       [<c107d091>] task_work_run+0x71/0x90
       [<c105725a>] exit_to_usermode_loop+0x72/0x9e
       [<c1001c7c>] do_fast_syscall_32+0x19c/0x1c0
       [<c176dd48>] sysenter_past_esp+0x45/0x74
      EIP: [<f89aacb5>] f2fs_evict_inode+0x85/0x490 [f2fs] SS:ESP 0068:c5213e78
      ---[ end trace d30536330b7fdc58 ]---
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0f3311a8
  14. 08 5月, 2016 4 次提交
  15. 28 4月, 2016 1 次提交
    • C
      f2fs: move node pages only in victim section during GC · da011cc0
      Chao Yu 提交于
      For foreground GC, we cache node blocks in victim section and set them
      dirty, then we call sync_node_pages to flush these node pages, but
      meanwhile, those node pages which does not locate in victim section
      will be flushed together, so more bandwidth and continuous free space
      would be occupied.
      
      So for this condition, it's better to leave those unrelated node page
      in cache for further write hit, and let CP or VM to flush them afterward.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      da011cc0
  16. 27 4月, 2016 4 次提交
  17. 15 4月, 2016 2 次提交
  18. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf