From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx167.postini.com [74.125.245.167]) by kanga.kvack.org (Postfix) with SMTP id D3D5B6B0031 for ; Fri, 26 Jul 2013 16:55:26 -0400 (EDT) Received: by mail-vc0-f178.google.com with SMTP id ha12so811483vcb.23 for ; Fri, 26 Jul 2013 13:55:25 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130726201807.GJ8661@moon> References: <20130726201807.GJ8661@moon> From: Andy Lutomirski Date: Fri, 26 Jul 2013 13:55:04 -0700 Message-ID: Subject: Re: [PATCH] mm: Save soft-dirty bits on file pages Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Cyrill Gorcunov Cc: Linux MM , LKML , Pavel Emelyanov , Andrew Morton , Matt Mackall , Xiao Guangrong , Marcelo Tosatti , KOSAKI Motohiro , Stephen Rothwell 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?) --Andy -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org