mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
thin: enable usage of kernel low_water_mark
Now with correctly functioning dmeventd enable usage of low_water_mark for faster reaction on pool's threshold. When user select e.g. 80% as a threshold value, dmeventd doesn't need to wait 10 seconds till monitoring timer expires, but nearly instantly resizes thin-pool to fit bellow threshold.
This commit is contained in:
parent
099466939e
commit
99237f0908
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.133 -
|
Version 2.02.133 -
|
||||||
======================================
|
======================================
|
||||||
|
Thin pool targets uses low_water_mark from profile.
|
||||||
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
|
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
|
||||||
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
|
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
|
||||||
For thins use flush for suspend only when volume size is reduced.
|
For thins use flush for suspend only when volume size is reduced.
|
||||||
|
@ -266,6 +266,8 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
|||||||
struct lvinfo info;
|
struct lvinfo info;
|
||||||
uint64_t transaction_id = 0;
|
uint64_t transaction_id = 0;
|
||||||
unsigned attr;
|
unsigned attr;
|
||||||
|
uint64_t low_water_mark;
|
||||||
|
int threshold;
|
||||||
|
|
||||||
if (!_thin_target_present(cmd, NULL, &attr))
|
if (!_thin_target_present(cmd, NULL, &attr))
|
||||||
return_0;
|
return_0;
|
||||||
@ -294,10 +296,20 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
threshold = find_config_tree_int(seg->lv->vg->cmd,
|
||||||
|
activation_thin_pool_autoextend_threshold_CFG,
|
||||||
|
lv_config_profile(seg->lv));
|
||||||
|
if (threshold < 50)
|
||||||
|
threshold = 50;
|
||||||
|
if (threshold < 100)
|
||||||
|
low_water_mark = (len * threshold + 99) / 100;
|
||||||
|
else
|
||||||
|
low_water_mark = len;
|
||||||
|
|
||||||
if (!dm_tree_node_add_thin_pool_target(node, len,
|
if (!dm_tree_node_add_thin_pool_target(node, len,
|
||||||
seg->transaction_id,
|
seg->transaction_id,
|
||||||
metadata_dlid, pool_dlid,
|
metadata_dlid, pool_dlid,
|
||||||
seg->chunk_size, seg->low_water_mark,
|
seg->chunk_size, low_water_mark,
|
||||||
seg->zero_new_blocks ? 0 : 1))
|
seg->zero_new_blocks ? 0 : 1))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user