[CRIU] [PATCH 0/5] pipes: support for packetized mode (with O_DIRECT)

Stanislav Kinsburskiy skinsbursky at odin.com
Tue Dec 15 09:55:22 PST 2015


There is something, I would like to discuss.
Currently, only _write_ end as O_DIRECT flag. Criu uses _read_ end to 
tee data from it to local pipe. There is a problem, _how_ to discover, 
whether pipe is "packetized" or not. This knowledge is required, because 
splice() can be used only for non-packetized pipes (otherwise all 
individual packets will be merged to one in image file).

But, I'm afraid, it's not enough... Because "packetized" pipe mode is 
not something stable, because it's represented by file flag. Regular 
pipe can be reopened with O_DIRECT flag or vise versa, but packets, 
which were sent, _when_ pipe was _"packetized"_, are already _marked_ as 
_"non-mergeable"_.
So, probably, in generic case, it's not enough to create a pipe on 
restore, fill it with data and set correct file flags, because pipe can 
contain both "packets" and regular content.
With dump situation is not better, or maybe even worse.
And dumping and restoring of such a pipe become a tricky operation.

Is there any ideas, how this problem should be handled?

15.12.2015 11:57, Stanislav Kinsburskiy пишет:
> This patch set adds support for pipes, working in packetized mode.
>
> Important Notes (kernel related):
>
> 1) Unfortunatelly, only write end is marked awith O_DIRECT in upstream kernel.
> While this patch set relies on the fact, that read end is also marked with
> If there is a simple way to find write end by read end, then would be nice to
> avoid this kernel patching.
>
> 2) Splice engine is broken for packetized pipes. This have to fixed in
> upstream. I'll provide patches soon.



More information about the CRIU mailing list