• Mike Rapoport's avatar
    lazy-pages: use random read from page-pipe instead of splitting it · 1ad1400c
    Mike Rapoport authored
    For the remote lazy pages case, to access pages in the middle of a pipe we
    are splitting the page_pipe_buffers and iovecs and use splice() to move the
    data between the underlying pipes. After the splits we get page_pipe_buffer
    with single iovec that can be used to splice() the data further into the
    socket.
    This patch replaces the splitting and splicing with use of a helper pipe
    and tee(). We tee() the pages from beginning of the pipe up to the last
    requested page into a helper pipe, sink the unneeded head part into
    /dev/null and we get the requested pages ready for splice() into the
    socket.
    This allows lazy-pages daemon to request the same page several time, which
    is required to properly support fork() after the restore.
    As added bonus we simplify the code and reduce amount of pipes that live in
    the system.
    Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
    Acked-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    1ad1400c
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...