1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

device_mapper: increase mem pool chunk size

Use bigger memory pool chunk size and reduces amount of
memory pool extensions when handling larger metadata, but do not
make it noticable bigger when handling small ones...

Use same large value also when allocating VG memory pool.
This commit is contained in:
Zdenek Kabelac 2024-10-12 20:52:27 +02:00
parent 9c9953dc3e
commit 89da9ae251
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ static int _tok_match(const char *str, const char *b, const char *e)
struct dm_config_tree *dm_config_create(void) struct dm_config_tree *dm_config_create(void)
{ {
struct dm_config_tree *cft; struct dm_config_tree *cft;
struct dm_pool *mem = dm_pool_create("config", 10 * 1024); struct dm_pool *mem = dm_pool_create("config", 63 * 1024);
if (!mem) { if (!mem) {
log_error("Failed to allocate config pool."); log_error("Failed to allocate config pool.");

View File

@ -35,7 +35,7 @@
#define MIN_PE_SIZE (8192L >> SECTOR_SHIFT) /* 8 KB in sectors - format1 only */ #define MIN_PE_SIZE (8192L >> SECTOR_SHIFT) /* 8 KB in sectors - format1 only */
#define MAX_PE_SIZE (16L * 1024L * (1024L >> SECTOR_SHIFT) * 1024L) /* format1 only */ #define MAX_PE_SIZE (16L * 1024L * (1024L >> SECTOR_SHIFT) * 1024L) /* format1 only */
#define MIRROR_LOG_OFFSET 2 /* sectors */ #define MIRROR_LOG_OFFSET 2 /* sectors */
#define VG_MEMPOOL_CHUNK 10240 /* in bytes, hint only */ #define VG_MEMPOOL_CHUNK 63000 /* in bytes, hint only */
/* /*
* Ceiling(n / sz) * Ceiling(n / sz)

View File

@ -102,7 +102,7 @@ static int _tok_match(const char *str, const char *b, const char *e)
struct dm_config_tree *dm_config_create(void) struct dm_config_tree *dm_config_create(void)
{ {
struct dm_config_tree *cft; struct dm_config_tree *cft;
struct dm_pool *mem = dm_pool_create("config", 10 * 1024); struct dm_pool *mem = dm_pool_create("config", 63 * 1024);
if (!mem) { if (!mem) {
log_error("Failed to allocate config pool."); log_error("Failed to allocate config pool.");