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
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
#define ENDIO_HOOK_POOL_SIZE 1024
|
||||
#define MAPPING_POOL_SIZE 1024
|
||||
#define PRISON_CELLS 1024
|
||||
#define COMMIT_PERIOD HZ
|
||||
#define NO_SPACE_TIMEOUT_SECS 60
|
||||
|
||||
@@ -2193,7 +2192,7 @@ static struct pool *pool_create(struct mapped_device *pool_md,
|
||||
pool->sectors_per_block_shift = __ffs(block_size);
|
||||
pool->low_water_blocks = 0;
|
||||
pool_features_init(&pool->pf);
|
||||
pool->prison = dm_bio_prison_create(PRISON_CELLS);
|
||||
pool->prison = dm_bio_prison_create();
|
||||
if (!pool->prison) {
|
||||
*error = "Error creating pool's bio prison";
|
||||
err_p = ERR_PTR(-ENOMEM);
|
||||
|
Reference in New Issue
Block a user