1. 24 5月, 2016 3 次提交
  2. 14 10月, 2014 1 次提交
  3. 09 8月, 2014 3 次提交
  4. 04 7月, 2013 1 次提交
  5. 04 8月, 2012 1 次提交
  6. 31 7月, 2012 3 次提交
  7. 10 5月, 2011 1 次提交
  8. 09 3月, 2011 7 次提交
  9. 10 1月, 2011 1 次提交
  10. 23 10月, 2010 8 次提交
  11. 23 7月, 2010 4 次提交
    • R
      nilfs2: do not update log cursor for small change · 32502047
      Ryusuke Konishi 提交于
      Super blocks of nilfs are periodically overwritten in order to record
      the recent log position.  This shortens recovery time after unclean
      unmount, but the current implementation performs the update even for a
      few blocks of change.  If the filesystem gets small changes slowly and
      continually, super blocks may be updated excessively.
      
      This moderates the issue by skipping update of log cursor if it does
      not cross a segment boundary.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      32502047
    • J
      nilfs2: sync super blocks in turns · b2ac86e1
      Jiro SEKIBA 提交于
      This will sync super blocks in turns instead of syncing duplicate
      super blocks at the time.  This will help searching valid super root
      when super block is written into disk before log is written, which is
      happen when barrier-less block devices are unmounted uncleanly.  In
      the situation, old super block likely points to valid log.
      
      This patch introduces ns_sbwcount member to the nilfs object and adds
      nilfs_sb_will_flip() function; ns_sbwcount counts how many times super
      blocks write back to the disk.  And, nilfs_sb_will_flip() decides
      whether flipping required or not based on the count of ns_sbwcount to
      sync super blocks asymmetrically.
      
      The following functions are also changed:
      
       - nilfs_prepare_super(): flips super blocks according to the
         argument.  The argument is calculated by nilfs_sb_will_flip()
         function.
      
       - nilfs_cleanup_super(): sets "clean" flag to both super blocks if
         they point to the same checkpoint.
      
      To update both of super block information, caller of
      nilfs_commit_super must set the information on both super blocks.
      Signed-off-by: NJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b2ac86e1
    • R
      nilfs2: get rid of ns_free_segments_count · 57a4bfc4
      Ryusuke Konishi 提交于
      This counter is unused.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      57a4bfc4
    • R
      nilfs2: add blocksize member to nilfs object · 92c60cca
      Ryusuke Konishi 提交于
      This stores blocksize in nilfs objects for the successive refactoring
      of recovery logic.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      92c60cca
  12. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  13. 13 2月, 2010 2 次提交
  14. 20 11月, 2009 1 次提交
  15. 14 9月, 2009 3 次提交
    • J
      nilfs2: shorten freeze period due to GC in write operation v3 · 1cf58fa8
      Jiro SEKIBA 提交于
      This is a re-revised patch to shorten freeze period.
      This version include a fix of the bug Konishi-san mentioned last time.
      
      When GC is runnning, GC moves live block to difference segments.
      Copying live blocks into memory is done in a transaction,
      however it is not necessarily to be in the transaction.
      This patch will get the nilfs_ioctl_move_blocks() out from
      transaction lock and put it before the transaction.
      
      I ran sysbench fileio test against nilfs partition.
      I copied some DVD/CD images and created snapshot to create live blocks
      before starting the benchmark.
      
      Followings are summary of rc8 and rc8 w/ the patch of per-request
      statistics, which is min/max and avg.  I ran each test three times and
      bellow is average of those numers.
      
      According to this benchmark result, average time is slightly degrated.
      However, worstcase (max) result is significantly improved.
      This can address a few seconds write freeze.
      
      - random write per-request performance of rc8
       min   0.843ms
       max 680.406ms
       avg   3.050ms
      - random write per-request performance of rc8 w/ this patch
       min   0.843ms -> 100.00%
       max 380.490ms ->  55.90%
       avg   3.233ms -> 106.00%
      
      - sequential write per-request performance of rc8
       min   0.736ms
       max 774.343ms
       avg   2.883ms
      - sequential write per-request performance of rc8 w/ this patch
       min   0.720ms ->  97.80%
       max  644.280ms->  83.20%
       avg   3.130ms -> 108.50%
      
      -----8<-----8<-----nilfs_cleanerd.conf-----8<-----8<-----
      protection_period       150
      selection_policy        timestamp       # timestamp in ascend order
      nsegments_per_clean     2
      cleaning_interval       2
      retry_interval          60
      use_mmap
      log_priority            info
      -----8<-----8<-----nilfs_cleanerd.conf-----8<-----8<-----
      Signed-off-by: NJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      1cf58fa8
    • J
      nilfs2: clean up nilfs_write_super · 79efdd94
      Jiro SEKIBA 提交于
      Separate conditions that check if syncing super block and alternative
      super block are required as inline functions to reuse the conditions.
      Signed-off-by: NJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      79efdd94
    • R
      nilfs2: use semaphore to protect pointer to a writable FS-instance · 027d6404
      Ryusuke Konishi 提交于
      will get rid of nilfs_get_writer() and nilfs_put_writer() pair used to
      retain a writable FS-instance for a period.
      
      The pair functions were making up some kind of recursive lock with a
      mutex, but they became overkill since the commit
      201913ed.  Furthermore, they caused
      the following lockdep warning because the mutex can be released by a
      task which didn't lock it:
      
       =====================================
       [ BUG: bad unlock balance detected! ]
       -------------------------------------
       kswapd0/422 is trying to release lock (&nilfs->ns_writer_mutex) at:
       [<c1359ff5>] mutex_unlock+0x8/0xa
       but there are no more locks to release!
      
       other info that might help us debug this:
       no locks held by kswapd0/422.
      
       stack backtrace:
       Pid: 422, comm: kswapd0 Not tainted 2.6.31-rc4-nilfs #51
       Call Trace:
        [<c1358f97>] ? printk+0xf/0x18
        [<c104fea7>] print_unlock_inbalance_bug+0xcc/0xd7
        [<c11578de>] ? prop_put_global+0x3/0x35
        [<c1050195>] lock_release+0xed/0x1dc
        [<c1359ff5>] ? mutex_unlock+0x8/0xa
        [<c1359f83>] __mutex_unlock_slowpath+0xaf/0x119
        [<c1359ff5>] mutex_unlock+0x8/0xa
        [<d1284add>] nilfs_mdt_write_page+0xd8/0xe1 [nilfs2]
        [<c1092653>] shrink_page_list+0x379/0x68d
        [<c109171b>] ? isolate_pages_global+0xb4/0x18c
        [<c1092bd2>] shrink_list+0x26b/0x54b
        [<c10930be>] shrink_zone+0x20c/0x2a2
        [<c10936b7>] kswapd+0x407/0x591
        [<c1091667>] ? isolate_pages_global+0x0/0x18c
        [<c1040603>] ? autoremove_wake_function+0x0/0x33
        [<c10932b0>] ? kswapd+0x0/0x591
        [<c104033b>] kthread+0x69/0x6e
        [<c10402d2>] ? kthread+0x0/0x6e
        [<c1003e33>] kernel_thread_helper+0x7/0x1a
      
      This patch uses a reader/writer semaphore instead of the own lock and
      kills this warning.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      027d6404