This patch creates intermediate buffer for reading from block driver
state and performs read-ahead to this buffer. Snapshot code performs
reads sequentially and thus we know what offsets will be required
and when they will become not needed.
Results are fantastic. Switch to snapshot times of 2GB Fedora 31 VM
over NVME storage are the following:
original fixed
cached: 1.84s 1.16s
non-cached: 12.74s 1.27s
The difference over HDD would be more significant:)
Signed-off-by: Denis V. Lunev<den@openvz.org>
CC: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
CC: Kevin Wolf<kwolf@redhat.com>
CC: Max Reitz<mreitz@redhat.com>
CC: Stefan Hajnoczi<stefanha@redhat.com>
CC: Fam Zheng<fam@euphon.net>
CC: Juan Quintela<quintela@redhat.com>
CC: Denis Plotnikov<dplotnikov@virtuozzo.com>