summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Pestov <sviatoslavpestov@gmail.com>2014-06-20 20:09:03 -0700
committerKent Overstreet <kent.overstreet@gmail.com>2017-01-18 20:19:48 -0900
commit8b5c7a3253b25771bbb86fc3dd62bfc19aa3d271 (patch)
treefbe9d551771a3a1222338fcd3e16321287988299
parentfd7ed16ea926b49254ebd1fcd2fc86239fb7023f (diff)
bcache: allocator doesn't need to wake up mca_wait
Before the async bucket allocation changes, we would wake up c->btree_cache_wait from the allocator thread, because btree_check_reserve() would actually use this wait queue for waiting on both buckets and the memory cache. This was an artifact of how the btree_root() macro was written, using finish_wait(). After some refactoring, mca_wait was split off from btree_cache_wait, and the latter merged into bucket_wait. Now mca_wait is only used for waiting on another thread to call mca_cannibalize_unlock(). Thus, waking up these threads from the allocator is a waste of time. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--drivers/md/bcache/alloc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 9308c053e9fc..d1012bb5dc78 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -431,7 +431,6 @@ static int bch_allocator_thread(void *arg)
bch_allocator_push(ca, bucket));
fifo_pop(&ca->free_inc, bucket);
- wake_up(&c->mca_wait);
closure_wake_up(&c->bucket_wait);
}