1. 21 Nov, 2011 1 commit
    • Tejun Heo's avatar
      freezer: unexport refrigerator() and update try_to_freeze() slightly · a0acae0e
      Tejun Heo authored
      
      There is no reason to export two functions for entering the
      refrigerator.  Calling refrigerator() instead of try_to_freeze()
      doesn't save anything noticeable or removes any race condition.
      
      * Rename refrigerator() to __refrigerator() and make it return bool
        indicating whether it scheduled out for freezing.
      
      * Update try_to_freeze() to return bool and relay the return value of
        __refrigerator() if freezing().
      
      * Convert all refrigerator() users to try_to_freeze().
      
      * Update documentation accordingly.
      
      * While at it, add might_sleep() to try_to_freeze().
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Christoph Hellwig <hch@infradead.org>
      a0acae0e
  2. 11 Jun, 2011 1 commit
  3. 10 May, 2011 7 commits
  4. 09 Mar, 2011 7 commits
  5. 02 Mar, 2011 1 commit
    • Ryusuke Konishi's avatar
      nilfs2: fix regression that i-flag is not set on changeless checkpoints · 72746ac6
      Ryusuke Konishi authored
      
      According to the report from Jiro SEKIBA titled "regression in
      2.6.37?"  (Message-Id: <8739n8vs1f.wl%jir@sekiba.com>), on 2.6.37 and
      later kernels, lscp command no longer displays "i" flag on checkpoints
      that snapshot operations or garbage collection created.
      
      This is a regression of nilfs2 checkpointing function, and it's
      critical since it broke behavior of a part of nilfs2 applications.
      For instance, snapshot manager of TimeBrowse gets to create
      meaningless snapshots continuously; snapshot creation triggers another
      checkpoint, but applications cannot distinguish whether the new
      checkpoint contains meaningful changes or not without the i-flag.
      
      This patch fixes the regression and brings that application behavior
      back to normal.
      Reported-by: default avatarJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Tested-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Tested-by: default avatarJiro SEKIBA <jir@unicus.jp>
      Cc: stable <stable@kernel.org>  [2.6.37]
      72746ac6
  6. 10 Jan, 2011 3 commits
  7. 26 Oct, 2010 1 commit
    • Michael Rubin's avatar
      mm: add account_page_writeback() · f629d1c9
      Michael Rubin authored
      
      To help developers and applications gain visibility into writeback
      behaviour this patch adds two counters to /proc/vmstat.
      
        # grep nr_dirtied /proc/vmstat
        nr_dirtied 3747
        # grep nr_written /proc/vmstat
        nr_written 3618
      
      These entries allow user apps to understand writeback behaviour over time
      and learn how it is impacting their performance.  Currently there is no
      way to inspect dirty and writeback speed over time.  It's not possible for
      nr_dirty/nr_writeback.
      
      These entries are necessary to give visibility into writeback behaviour.
      We have /proc/diskstats which lets us understand the io in the block
      layer.  We have blktrace for more in depth understanding.  We have
      e2fsprogs and debugsfs to give insight into the file systems behaviour,
      but we don't offer our users the ability understand what writeback is
      doing.  There is no way to know how active it is over the whole system, if
      it's falling behind or to quantify it's efforts.  With these values
      exported users can easily see how much data applications are sending
      through writeback and also at what rates writeback is processing this
      data.  Comparing the rates of change between the two allow developers to
      see when writeback is not able to keep up with incoming traffic and the
      rate of dirty memory being sent to the IO back end.  This allows folks to
      understand their io workloads and track kernel issues.  Non kernel
      engineers at Google often use these counters to solve puzzling performance
      problems.
      
      Patch #4 adds a pernode vmstat file with nr_dirtied and nr_written
      
      Patch #5 add writeback thresholds to /proc/vmstat
      
      Currently these values are in debugfs. But they should be promoted to
      /proc since they are useful for developers who are writing databases
      and file servers and are not debugging the kernel.
      
      The output is as below:
      
       # grep threshold /proc/vmstat
       nr_pages_dirty_threshold 409111
       nr_pages_dirty_background_threshold 818223
      
      This patch:
      
      This allows code outside of the mm core to safely manipulate page
      writeback state and not worry about the other accounting.  Not using these
      routines means that some code will lose track of the accounting and we get
      bugs.
      
      Modify nilfs2 to use interface.
      Signed-off-by: default avatarMichael Rubin <mrubin@google.com>
      Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Reviewed-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Jiro SEKIBA <jir@unicus.jp>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f629d1c9
  8. 23 Oct, 2010 9 commits
  9. 23 Jul, 2010 4 commits
    • Ryusuke Konishi's avatar
      nilfs2: do not update log cursor for small change · 32502047
      Ryusuke Konishi authored
      
      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: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      32502047
    • Jiro SEKIBA's avatar
      nilfs2: sync super blocks in turns · b2ac86e1
      Jiro SEKIBA authored
      
      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: default avatarJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b2ac86e1
    • Jiro SEKIBA's avatar
      nilfs2: introduce nilfs_prepare_super · d26493b6
      Jiro SEKIBA authored
      
      This function checks validity of super block pointers.
      If first super block is invalid, it will swap the super blocks.
      The function should be called before any super block information updates.
      Caller must obtain nilfs->ns_sem.
      Signed-off-by: default avatarJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      d26493b6
    • Ryusuke Konishi's avatar
      nilfs2: get rid of macros for segment summary information · 4762077c
      Ryusuke Konishi authored
      
      This removes macros to test segment summary flags and redefines a few
      relevant macros with inline functions.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      4762077c
  10. 10 May, 2010 6 commits