From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632Ab3G0T35 (ORCPT ); Sat, 27 Jul 2013 15:29:57 -0400 Received: from relay.parallels.com ([195.214.232.42]:55218 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161Ab3G0T34 (ORCPT ); Sat, 27 Jul 2013 15:29:56 -0400 Message-ID: <51F41FA0.6060205@parallels.com> Date: Sat, 27 Jul 2013 23:29:36 +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: Andy Lutomirski CC: Cyrill Gorcunov , Linux MM , LKML , Andrew Morton , Matt Mackall , Xiao Guangrong , Marcelo Tosatti , KOSAKI Motohiro , Stephen Rothwell Subject: Re: [PATCH] mm: Save soft-dirty bits on file pages References: <20130726201807.GJ8661@moon> In-Reply-To: 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/27/2013 12:55 AM, Andy Lutomirski wrote: > On Fri, Jul 26, 2013 at 1:18 PM, Cyrill Gorcunov wrote: >> Andy reported that if file page get reclaimed we loose soft-dirty bit >> if it was there, so save _PAGE_BIT_SOFT_DIRTY bit when page address >> get encoded into pte entry. Thus when #pf happens on such non-present >> pte we can restore it back. >> > > Unless I'm misunderstanding this, it's saving the bit in the > non-present PTE. This sounds wrong -- what happens if the entire pmd > (or whatever the next level is called) gets zapped? (Also, what > happens if you unmap a file and map a different file there?) The whole pte gets zapped on vma unmap, and in this case forgetting the soft-dirty bit completely is OK. > --Andy > . >