[Devel] [PATCH RHEL7 COMMIT] ploop: skip writes of zeroes to unallocated blocks by default

Konstantin Khorenko khorenko at odin.com
Mon May 18 21:27:01 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.1
------>
commit 6051dc5f6e200cef2011e2174d1c3b76280fe75f
Author: Andrey Smetanin <asmetanin at virtuozzo.com>
Date:   Tue May 19 08:27:01 2015 +0400

    ploop: skip writes of zeroes to unallocated blocks by default
    
    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 at p2 ~]# echo 1 >/sys/block/ploop37803/ptune/check_zeros
      [root at 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 <khorenko at parallels.com>
    
    Acked-by: Maxim V. Patlasov <mpatlasov at 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



More information about the Devel mailing list