diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-12-17 01:29:34 -0800 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-08 13:05:09 -0800 |
commit | 78365411b344df35a198b119133e6515c2dcfb9f (patch) | |
tree | e94c2e1bd0d5dc53e6a938b012e9b20d3a511eca /include/trace | |
parent | 1dd13c8d3c2d82e1b668d0b4754591291656542a (diff) | |
download | linux-78365411b344df35a198b119133e6515c2dcfb9f.tar.bz2 |
bcache: Rework allocator reserves
We need a reserve for allocating buckets for new btree nodes - and now that
we've got multiple btrees, it really needs to be per btree.
This reworks the reserves so we've got separate freelists for each reserve
instead of watermarks, which seems to make things a bit cleaner, and it adds
some code so that btree_split() can make sure the reserve is available before it
starts.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/bcache.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index 095c6e4fe1e8..0c5cf2f63dc3 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h @@ -411,7 +411,7 @@ TRACE_EVENT(bcache_alloc_invalidate, ), TP_fast_assign( - __entry->free = fifo_used(&ca->free); + __entry->free = fifo_used(&ca->free[RESERVE_NONE]); __entry->free_inc = fifo_used(&ca->free_inc); __entry->free_inc_size = ca->free_inc.size; __entry->unused = fifo_used(&ca->unused); @@ -422,8 +422,8 @@ TRACE_EVENT(bcache_alloc_invalidate, ); TRACE_EVENT(bcache_alloc_fail, - TP_PROTO(struct cache *ca), - TP_ARGS(ca), + TP_PROTO(struct cache *ca, unsigned reserve), + TP_ARGS(ca, reserve), TP_STRUCT__entry( __field(unsigned, free ) @@ -433,7 +433,7 @@ TRACE_EVENT(bcache_alloc_fail, ), TP_fast_assign( - __entry->free = fifo_used(&ca->free); + __entry->free = fifo_used(&ca->free[reserve]); __entry->free_inc = fifo_used(&ca->free_inc); __entry->unused = fifo_used(&ca->unused); __entry->blocked = atomic_read(&ca->set->prio_blocked); |