1. 09 1月, 2014 5 次提交
  2. 17 12月, 2013 2 次提交
  3. 24 11月, 2013 2 次提交
    • K
      block: Introduce new bio_split() · 20d0189b
      Kent Overstreet 提交于
      The new bio_split() can split arbitrary bios - it's not restricted to
      single page bios, like the old bio_split() (previously renamed to
      bio_pair_split()). It also has different semantics - it doesn't allocate
      a struct bio_pair, leaving it up to the caller to handle completions.
      
      Then convert the existing bio_pair_split() users to the new bio_split()
      - and also nvme, which was open coding bio splitting.
      
      (We have to take that BUG_ON() out of bio_integrity_trim() because this
      bio_split() needs to use it, and there's no reason it has to be used on
      bios marked as cloned; BIO_CLONED doesn't seem to have clearly
      documented semantics anyways.)
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Neil Brown <neilb@suse.de>
      20d0189b
    • K
      bcache: Kill unaligned bvec hack · ed9c47be
      Kent Overstreet 提交于
      Bcache has a hack to avoid cloning the biovec if it's all full pages -
      but with immutable biovecs coming this won't be necessary anymore.
      
      For now, we remove the special case and always clone the bvec array so
      that the immutable biovec patches are simpler.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      ed9c47be
  4. 11 11月, 2013 18 次提交
  5. 25 9月, 2013 1 次提交
    • K
      bcache: Fix a writeback performance regression · c2a4f318
      Kent Overstreet 提交于
      Background writeback works by scanning the btree for dirty data and
      adding those keys into a fixed size buffer, then for each dirty key in
      the keybuf writing it to the backing device.
      
      When read_dirty() finishes and it's time to scan for more dirty data, we
      need to wait for the outstanding writeback IO to finish - they still
      take up slots in the keybuf (so that foreground writes can check for
      them to avoid races) - without that wait, we'll continually rescan when
      we'll be able to add at most a key or two to the keybuf, and that takes
      locks that starves foreground IO.  Doh.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2a4f318
  6. 12 7月, 2013 2 次提交
    • K
      bcache: Allocation kthread fixes · 79826c35
      Kent Overstreet 提交于
      The alloc kthread should've been using try_to_freeze() - and also there
      was the potential for the alloc kthread to get woken up after it had
      shut down, which would have been bad.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      79826c35
    • K
      bcache: Fix a sysfs splat on shutdown · c9502ea4
      Kent Overstreet 提交于
      If we stopped a bcache device when we were already detaching (or
      something like that), bcache_device_unlink() would try to remove a
      symlink from sysfs that was already gone because the bcache dev kobject
      had already been removed from sysfs.
      
      So keep track of whether we've removed stuff from sysfs.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
      c9502ea4
  7. 27 6月, 2013 7 次提交
    • K
      bcache: Write out full stripes · 72c27061
      Kent Overstreet 提交于
      Now that we're tracking dirty data per stripe, we can add two
      optimizations for raid5/6:
      
       * If a stripe is already dirty, force writes to that stripe to
         writeback mode - to help build up full stripes of dirty data
      
       * When flushing dirty data, preferentially write out full stripes first
         if there are any.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      72c27061
    • K
      bcache: Track dirty data by stripe · 279afbad
      Kent Overstreet 提交于
      To make background writeback aware of raid5/6 stripes, we first need to
      track the amount of dirty data within each stripe - we do this by
      breaking up the existing sectors_dirty into per stripe atomic_ts
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      279afbad
    • K
      bcache: Initialize sectors_dirty when attaching · 444fc0b6
      Kent Overstreet 提交于
      Previously, dirty_data wouldn't get initialized until the first garbage
      collection... which was a bit of a problem for background writeback (as
      the PD controller keys off of it) and also confusing for users.
      
      This is also prep work for making background writeback aware of raid5/6
      stripes.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      444fc0b6
    • K
      bcache: Improve lazy sorting · 6ded34d1
      Kent Overstreet 提交于
      The old lazy sorting code was kind of hacky - rewrite in a way that
      mathematically makes more sense; the idea is that the size of the sets
      of keys in a btree node should increase by a more or less fixed ratio
      from smallest to biggest.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      6ded34d1
    • K
      bcache: Fix/revamp tracepoints · c37511b8
      Kent Overstreet 提交于
      The tracepoints were reworked to be more sensible, and fixed a null
      pointer deref in one of the tracepoints.
      
      Converted some of the pr_debug()s to tracepoints - this is partly a
      performance optimization; it used to be that with DEBUG or
      CONFIG_DYNAMIC_DEBUG pr_debug() was an empty macro; but at some point it
      was changed to an empty inline function.
      
      Some of the pr_debug() statements had rather expensive function calls as
      part of the arguments, so this code was getting run unnecessarily even
      on non debug kernels - in some fast paths, too.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      c37511b8
    • K
      bcache: Refactor btree io · 57943511
      Kent Overstreet 提交于
      The most significant change is that btree reads are now done
      synchronously, instead of asynchronously and doing the post read stuff
      from a workqueue.
      
      This was originally done because we can't block on IO under
      generic_make_request(). But - we already have a mechanism to punt cache
      lookups to workqueue if needed, so if we just use that we don't have to
      deal with the complexity of doing things asynchronously.
      
      The main benefit is this makes the locking situation saner; we can hold
      our write lock on the btree node until we're finished reading it, and we
      don't need that btree_node_read_done() flag anymore.
      
      Also, for writes, btree_write() was broken out into btree_node_write()
      and btree_leaf_dirty() - the old code with the boolean argument was dumb
      and confusing.
      
      The prio_blocked mechanism was improved a bit too, now the only counter
      is in struct btree_write, we don't mess with transfering a count from
      struct btree anymore.
      
      This required changing garbage collection to block prios at the start
      and unblock when it finishes, which is cleaner than what it was doing
      anyways (the old code had mostly the same effect, but was doing it in a
      convoluted way)
      
      And the btree iter btree_node_read_done() uses was converted to a real
      mempool.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      57943511
    • K
      bcache: Convert allocator thread to kthread · 119ba0f8
      Kent Overstreet 提交于
      Using a workqueue when we just want a single thread is a bit silly.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      119ba0f8
  8. 15 5月, 2013 1 次提交
  9. 21 4月, 2013 1 次提交
  10. 29 3月, 2013 1 次提交