Re: [PATCH] mm: Save soft-dirty bits on swapped pages

From: Pavel Emelyanov
Date: Wed Jul 24 2013 - 14:52:38 EST


On 07/24/2013 08:23 PM, Andy Lutomirski wrote:
> On Wed, Jul 24, 2013 at 9:08 AM, Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:
>> Andy Lutomirski reported that in case if a page with _PAGE_SOFT_DIRTY
>> bit set get swapped out, the bit is getting lost and no longer
>> available when pte read back.
>
> Potentially silly question (due to my completely lack of understanding
> of how swapping works in Linux): what about file-backed pages?

Strictly speaking file-backed mappings should also be fixed to keep the
soft-dirty bit, yes.

But in checkpoint-restore _shared_ file mappings are not of interest, as
all the data (changed or not) sits in the file and we just don't need to
take it into dump. If the file mapping of _private_, then pages, that are
written to become anonymous and occur in the swap cache and are handled
by this patch.

> (Arguably these would be best supported by filesystems instead of by
> the core vm, in which case it might make sense to drop soft-dirty
> support for these pages entirely.)
>
> --Andy
> .
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/