On 07/24/2013 08:08 PM, Cyrill Gorcunov 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.
> 
> To resolve this we introduce _PTE_SWP_SOFT_DIRTY bit which is
> saved in pte entry for the page being swapped out. When such page
> is to be read back from a swap cache we check for bit presence
> and if it's there we clear it and restore the former _PAGE_SOFT_DIRTY
> bit back.
> 
> One of the problem was to find a place in pte entry where we can
> save the _PTE_SWP_SOFT_DIRTY bit while page is in swap. The
> _PAGE_PSE was chosen for that, it doesn't intersect with swap
> entry format stored in pte.
> 
> Reported-by: Andy Lutomirski <[email protected]>
> Signed-off-by: Pavel Emelyanov <[email protected]>
> Signed-off-by: Cyrill Gorcunov <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Matt Mackall <[email protected]>
> Cc: Xiao Guangrong <[email protected]>
> Cc: Marcelo Tosatti <[email protected]>
> Cc: KOSAKI Motohiro <[email protected]>
> Cc: Stephen Rothwell <[email protected]>

Acked-by: Pavel Emelyanov <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to