[CRIU] [PATCH 1/7] Adding --pre-dump-mode option
    Dmitry Safonov 
    0x7f454c46 at gmail.com
       
    Wed Aug 28 19:44:24 MSK 2019
    
    
  
Hi Abhishek,
Thanks for doing this work,
On 8/25/19 2:58 AM, Abhishek Dubey wrote:
[..]
> +*--pre-dump-mode*='mode'::
> +    There are two 'mode' to operate pre-dump algorithm. The 'splice' mode
> +    is parasite based, whereas 'read' mode is based on process_vm_readv
> +    syscall. The 'read' mode incurs reduced frozen time and reduced
> +    memory pressure as compared to 'splice' mode. Default is 'splice' mode.
> +
It seems from the code that it's safe to do:
pre-dump-1: splice-based
pre-dump-2: read-based
...
Could you add in doc that it's safe to mix those modes?
Also, could you add a zdtm.py launch with this mode to cover it with
Travis-CI? I think, the proper place would be in:
scripts/travis/travis-tests
And another line that will run "mixed" old-new predumps.
That will make sure that further improvements don't break your work on
new pre-dump mechanism.
[..]
>  /*
> + * Pre-dump variants
> + */
> +#define PRE_DUMP_SPLICE		1		/* Pre-dump using parasite */
> +#define PRE_DUMP_READ			2		/* Pre-dump using process_vm_readv syscall */
> +
> +/*
>   * Cgroup management options.
>   */
>  #define CG_MODE_IGNORE		(0u << 0)	/* Zero is important here */
> @@ -81,6 +87,7 @@ struct cr_options {
>  	int			evasive_devices;
>  	int			link_remap_ok;
>  	int			log_file_per_pid;
> +	int			pre_dump_mode;
Minor stilistic nit: Could we make it enum?
enum pre_dump_mode {
   PRE_DUMP_MODE_SPLICE = 0,
   PRE_DUMP_MODE_READ,
};
Might be my preference, so not insisting.
Thanks,
          Dmitry
    
    
More information about the CRIU
mailing list