Reading from unallocated blocks returns zeroes => we can safely skip writes of zeroes to unallocated blocks.
As a lot of tests do "dd if=/dev/zero ...", this optimization is valuable. Feature enabled, test results: [root@p2 ~]# echo 1 >/sys/block/ploop37803/ptune/check_zeros [root@p2 ~]# dd if=/dev/zero of=/mnt/sb-io-test bs=1M count=1k oflag=dsync 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 1.58975 s, 675 MB/s The impact on CPU utilization is negligible. https://jira.sw.ru/browse/PSBM-22506 https://jira.sw.ru/browse/PSBM-22381 Signed-off-by: Konstantin Khorenko <khore...@parallels.com> Acked-by: Maxim V. Patlasov <mpatla...@parallels.com> --- include/linux/ploop/ploop.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h index d295cba..434789e 100644 --- a/include/linux/ploop/ploop.h +++ b/include/linux/ploop/ploop.h @@ -323,6 +323,7 @@ struct ploop_tunable .congestion_low_watermark = DEFAULT_PLOOP_MAXRQ/2, \ .pass_flushes = 1, \ .pass_fuas = 1, \ +.check_zeros = 1, \ .max_active_requests = DEFAULT_PLOOP_BATCH_ENTRY_QLEN / 2, } struct ploop_stats -- 1.9.3 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel