Re: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

From: Pavel Emelyanov
Date: Fri Jul 12 2013 - 14:38:46 EST


On 07/11/2013 10:46 PM, Andy Lutomirski wrote:
>
> Sorry I'm late to the party -- I didn't notice this until the lwn
> article this week.
>
> How does this get munmap + mmap right? mremap marks things soft-dirty,
> but unmapping and remapping seems like it will result in the soft-dirty
> bit being cleared. For that matter, won't this sequence also end up wrong:
>
> - clear_refs
> - Write to mapping
> - Page and pte evicted due to memory pressure
> - Read from mapping -- clean page faulted back in
> - pte soft-dirty is now clear ?!?

Yes, it looks like this problem exists. I'll look what can be done about
it, thank you.

> --Andy

Pavel
--
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/