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>
This commit is contained in:

committed by
Mike Snitzer

parent
33096a7822
commit
a195db2d29
@@ -95,7 +95,6 @@ static void dm_unhook_bio(struct dm_hook_info *h, struct bio *bio)
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
||||
#define PRISON_CELLS 1024
|
||||
#define MIGRATION_POOL_SIZE 128
|
||||
#define COMMIT_PERIOD HZ
|
||||
#define MIGRATION_COUNT_WINDOW 10
|
||||
@@ -2327,7 +2326,7 @@ static int cache_create(struct cache_args *ca, struct cache **result)
|
||||
INIT_DELAYED_WORK(&cache->waker, do_waker);
|
||||
cache->last_commit_jiffies = jiffies;
|
||||
|
||||
cache->prison = dm_bio_prison_create(PRISON_CELLS);
|
||||
cache->prison = dm_bio_prison_create();
|
||||
if (!cache->prison) {
|
||||
*error = "could not create bio prison";
|
||||
goto bad;
|
||||
|
Reference in New Issue
Block a user