From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753775Ab3GXSwq (ORCPT ); Wed, 24 Jul 2013 14:52:46 -0400 Received: from relay.parallels.com ([195.214.232.42]:60732 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753045Ab3GXSwo (ORCPT ); Wed, 24 Jul 2013 14:52:44 -0400 Message-ID: <51F02273.1050308@parallels.com> Date: Wed, 24 Jul 2013 22:52:35 +0400 From: Pavel Emelyanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Cyrill Gorcunov , Andrew Morton CC: Linux MM , LKML , Andy Lutomirski , Matt Mackall , Xiao Guangrong , Marcelo Tosatti , KOSAKI Motohiro , Stephen Rothwell Subject: Re: [PATCH] mm: Save soft-dirty bits on swapped pages References: <20130724160826.GD24851@moon> In-Reply-To: <20130724160826.GD24851@moon> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [89.169.95.100] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Pavel Emelyanov > Signed-off-by: Cyrill Gorcunov > Cc: Andrew Morton > Cc: Matt Mackall > Cc: Xiao Guangrong > Cc: Marcelo Tosatti > Cc: KOSAKI Motohiro > Cc: Stephen Rothwell Acked-by: Pavel Emelyanov