[CRIU] ppc64le soft dirty tracking on 4.14

Adrian Reber areber at redhat.com
Wed Oct 4 09:23:06 MSK 2017


On Tue, Oct 03, 2017 at 04:01:37PM -0700, Andrei Vagin wrote:
> On Mon, Sep 25, 2017 at 06:08:26PM +0200, Adrian Reber wrote:
> > Hello Laurent,
> > 
> > I had a closer look and soft dirty tracking works correctly. I was just
> > confused by the page size. The file was 65536 and not the expected
> > 4096.
> > 
> > CRIU still cannot detect if CONFIG_MEM_SOFT_DIRTY is enabled or not.
> > The check always returns true and the criu pre-dump command is always
> > successful. In the case where CONFIG_MEM_SOFT_DIRTY=n CRIU still does
> > pre-dumps but it seems to always dump the complete memory.
> 
> I think it is a bug in a kernel and it can be fixed by a patch like
> this:

Thanks, Andrei. I will test it later today and let you know.

> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -78,7 +78,12 @@
>   */
>  #define _PAGE_PA_MAX           53
>  
> +#ifdef CONFIG_MEM_SOFT_DIRTY
>  #define _PAGE_SOFT_DIRTY       _RPAGE_SW3 /* software: software dirty tracking */
> +#elif
> +#define _PAGE_SOFT_DIRTY       0
> +#endif
> +
>  #define _PAGE_SPECIAL          _RPAGE_SW2 /* software: special page */
>  #define _PAGE_DEVMAP           _RPAGE_SW1 /* software: ZONE_DEVICE page */
>  #define __HAVE_ARCH_PTE_DEVMAP
> 
> I haven't try to test it, just got an idea from arch/x86/include/asm/pgtable_types.h.
> 
> Without this patch, the kernel has some logic about _PAGE_SOFT_DIRTY,
> even when CONFIG_MEM_SOFT_DIRTY isn't set.
> 
> 
> > 
> > 'criu/criu check --feature mem_dirty_track' is always successful.
> > 
> > Disabling CONFIG_PPC_RADIX_MMU makes also no difference to me.
> > 
> > So it seems the check for CONFIG_MEM_SOFT_DIRTY in CRIU on ppc64le is
> > broken. The kernel does that right thing.
> > 
> > 		Adrian
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list