summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Pestov <sviatoslavpestov@gmail.com>2014-06-20 20:09:03 -0700
committerKent Overstreet <kent.overstreet@gmail.com>2016-10-07 09:00:19 -0800
commit5e0c54762b17d0a59750a4e79c0393c7873871f4 (patch)
treed73e8b79079fbd7e8716b2c4d0fe33a09659b7fa
parent0d8547e5e4dd519ff3267baa806fad1ee008c604 (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);
}