From: Artem Bityutskiy Date: Tue, 24 Sep 2013 07:37:09 +0000 (+0300) Subject: BmapCopy: increase the batch queue length X-Git-Tag: v3.0~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=042c5b2ecb97ce532e1781351064e82fad0e86a3;p=tools%2Fbmap-tools.git BmapCopy: increase the batch queue length BmapCopy reads and writes from different threads to exploit parallelizm. There is a "batch queue" where the reader supply 1MiB buffers and the writer consumes them. The length of the queue is 6 for block devices and 2 for files. This patch makes it to be 6 everywhere since 2 is rather short. Change-Id: Ia4c6293ad2433fd7b466733ff9fbe5a0bd288d13 Signed-off-by: Artem Bityutskiy --- diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py index e22aa77..3899f38 100644 --- a/bmaptools/BmapCopy.py +++ b/bmaptools/BmapCopy.py @@ -140,7 +140,7 @@ class BmapCopy: self._batch_blocks = None self._batch_queue = None self._batch_bytes = 1024 * 1024 - self._batch_queue_len = 2 + self._batch_queue_len = 6 self.bmap_version = None self.bmap_version_major = None @@ -628,9 +628,6 @@ class BmapBdevCopy(BmapCopy): # Call the base class constructor first BmapCopy.__init__(self, image, dest, bmap, image_size, logger=logger) - self._batch_bytes = 1024 * 1024 - self._batch_blocks = self._batch_bytes / self.block_size - self._batch_queue_len = 6 self._dest_fsync_watermark = (6 * 1024 * 1024) / self.block_size self._sysfs_base = None