linux/drivers/md/bcache
Kent Overstreet 0a63b66db5 bcache: Rework btree cache reserve handling
This changes the bucket allocation reserves to use _real_ reserves - separate
freelists - instead of watermarks, which if nothing else makes the current code
saner to reason about and is going to be important in the future when we add
support for multiple btrees.

It also adds btree_check_reserve(), which checks (and locks) the reserves for
both bucket allocation and memory allocation for btree nodes; the old code just
kinda sorta assumed that since (e.g. for btree node splits) it had the root
locked and that meant no other threads could try to make use of the same
reserve; this technically should have been ok for memory allocation (we should
always have a reserve for memory allocation (the btree node cache is used as a
reserve and we preallocate it)), but multiple btrees will mean that locking the
root won't be sufficient anymore, and for the bucket allocation reserve it was
technically possible for the old code to deadlock.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
2014-03-18 12:23:35 -07:00
..
alloc.c bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
bcache.h bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
bset.c bcache: Fix another compiler warning on m68k 2014-02-18 08:55:05 -08:00
bset.h bcache: Add bch_keylist_init_single() 2014-03-18 12:22:36 -07:00
btree.c bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
btree.h bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
closure.c bcache: kill closure locking code 2014-01-08 13:05:08 -08:00
closure.h bcache: kill closure locking code 2014-01-08 13:05:08 -08:00
debug.c bcache: Convert debug code to btree_keys 2014-01-08 13:05:13 -08:00
debug.h bcache: Convert debug code to btree_keys 2014-01-08 13:05:13 -08:00
extents.c bcache: Add a real GC_MARK_RECLAIMABLE 2014-03-18 12:22:36 -07:00
extents.h bcache: Convert debug code to btree_keys 2014-01-08 13:05:13 -08:00
io.c block: Introduce new bio_split() 2013-11-23 22:33:57 -08:00
journal.c bcache: btree locking rework 2014-03-18 12:23:35 -07:00
journal.h bcache: Fix a shutdown bug 2014-02-25 18:42:49 -08:00
Kconfig bcache: Kill dead cgroup code 2014-03-18 12:22:35 -07:00
Makefile bcache: Abstract out stuff needed for sorting 2014-01-08 13:05:12 -08:00
movinggc.c bcache: stop moving_gc marking buckets that can't be moved. 2014-03-18 12:22:34 -07:00
request.c bcache: Kill dead cgroup code 2014-03-18 12:22:35 -07:00
request.h bcache: Kill dead cgroup code 2014-03-18 12:22:35 -07:00
stats.c bcache: Kill dead cgroup code 2014-03-18 12:22:35 -07:00
stats.h bcache: Break up struct search 2013-11-10 21:56:32 -08:00
super.c bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
sysfs.c bcache: Rework btree cache reserve handling 2014-03-18 12:23:35 -07:00
sysfs.h bcache: Don't export utility code, prefix with bch_ 2013-03-28 12:50:55 -06:00
trace.c bcache: Better alloc tracepoints 2014-03-18 12:22:35 -07:00
util.c Linux 3.13-rc6 2013-12-31 09:51:02 -07:00
util.h bcache: Convert debug code to btree_keys 2014-01-08 13:05:13 -08:00
writeback.c Linux 3.13-rc6 2013-12-31 09:51:02 -07:00
writeback.h block: Abstract out bvec iterator 2013-11-23 22:33:47 -08:00