diff options
author | Joe Thornber <ejt@redhat.com> | 2014-10-06 16:30:06 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-11-10 15:25:26 -0500 |
commit | a195db2d29a47c2c3a61386009bd400df18c86cf (patch) | |
tree | 17f9c41a52fa28c6a03840a0df24a3781c280217 /drivers/md/dm-cache-target.c | |
parent | 33096a7822de63bc7dbdd090870b656a0304fa35 (diff) |
dm bio prison: switch to using a red black tree
Previously it was using a fixed sized hash table. There are times
when very many concurrent cells are held (such as when processing a very
large discard). When this happens the hash table performance becomes
very poor.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-target.c')
-rw-r--r-- | drivers/md/dm-cache-target.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index 7130505c2425..69de8b43ca12 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c | |||
@@ -95,7 +95,6 @@ static void dm_unhook_bio(struct dm_hook_info *h, struct bio *bio) | |||
95 | 95 | ||
96 | /*----------------------------------------------------------------*/ | 96 | /*----------------------------------------------------------------*/ |
97 | 97 | ||
98 | #define PRISON_CELLS 1024 | ||
99 | #define MIGRATION_POOL_SIZE 128 | 98 | #define MIGRATION_POOL_SIZE 128 |
100 | #define COMMIT_PERIOD HZ | 99 | #define COMMIT_PERIOD HZ |
101 | #define MIGRATION_COUNT_WINDOW 10 | 100 | #define MIGRATION_COUNT_WINDOW 10 |
@@ -2327,7 +2326,7 @@ static int cache_create(struct cache_args *ca, struct cache **result) | |||
2327 | INIT_DELAYED_WORK(&cache->waker, do_waker); | 2326 | INIT_DELAYED_WORK(&cache->waker, do_waker); |
2328 | cache->last_commit_jiffies = jiffies; | 2327 | cache->last_commit_jiffies = jiffies; |
2329 | 2328 | ||
2330 | cache->prison = dm_bio_prison_create(PRISON_CELLS); | 2329 | cache->prison = dm_bio_prison_create(); |
2331 | if (!cache->prison) { | 2330 | if (!cache->prison) { |
2332 | *error = "could not create bio prison"; | 2331 | *error = "could not create bio prison"; |
2333 | goto bad; | 2332 | goto bad; |