summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorLi Wang <wangli@kylinos.com.cn>2012-10-30 19:52:40 +0800
committerTyler Hicks <tyhicks@canonical.com>2012-11-07 17:56:16 -0800
commite4bc6522d53b7b8eb02cfac35fd18275fd86269d (patch)
tree9b426d57ab9a433422debaf44ae7dad498acc15e /virt
parent0e4a43ed08e2f44aa7b96aa95d0a540d675483e1 (diff)
downloadtalos-obmc-linux-e4bc6522d53b7b8eb02cfac35fd18275fd86269d.tar.gz
talos-obmc-linux-e4bc6522d53b7b8eb02cfac35fd18275fd86269d.zip
eCryptfs: Avoid unnecessary disk read and data decryption during writing
ecryptfs_write_begin grabs a page from page cache for writing. If the page contains invalid data, or data older than the counterpart on the disk, eCryptfs will read out the corresponing data from the disk into the page, decrypt them, then perform writing. However, for this page, if the length of the data to be written into is equal to page size, that means the whole page of data will be overwritten, in which case, it does not matter whatever the data were before, it is beneficial to perform writing directly rather than bothering to read and decrypt first. With this optimization, according to our test on a machine with Intel Core 2 Duo processor, iozone 'write' operation on an existing file with write size being multiple of page size will enjoy a steady 3x speedup. Signed-off-by: Li Wang <wangli@kylinos.com.cn> Signed-off-by: Yunchuan Wen <wenyunchuan@kylinos.com.cn> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud