From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538Ab3GXTFA (ORCPT ); Wed, 24 Jul 2013 15:05:00 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:56021 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105Ab3GXTE5 (ORCPT ); Wed, 24 Jul 2013 15:04:57 -0400 Date: Wed, 24 Jul 2013 23:04:53 +0400 From: Cyrill Gorcunov To: Pavel Emelyanov Cc: Andy Lutomirski , James Bottomley , Linux MM , LKML , Andrew Morton , Matt Mackall , Xiao Guangrong , Marcelo Tosatti , KOSAKI Motohiro , Stephen Rothwell Subject: Re: [PATCH] mm: Save soft-dirty bits on swapped pages Message-ID: <20130724190453.GJ8508@moon> References: <20130724163734.GE24851@moon> <20130724171728.GH8508@moon> <1374687373.7382.22.camel@dabdike> <20130724181516.GI8508@moon> <20130724185256.GA24365@moon> <51F0232D.6060306@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F0232D.6060306@parallels.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2013 at 10:55:41PM +0400, Pavel Emelyanov wrote: > > > > Well, some part of information already lays in pte (such as 'file' bit, > > swap entries) so it looks natural i think to work on this level. but > > letme think if use page struct for that be more convenient... > > It hardly will be. Consider we have a page shared between two tasks, > then first one "touches" it and soft-dirty is put onto his PTE and, > subsequently, the page itself. The we go and clear sofr-dirty for the > 2nd task. What should we do with the soft-dirty bit on the page? Indeed, this won't help. Well then, bippidy-boppidy-boo, our pants are metaphorically on fire (c) > > The soft-dirty thing watches changes in the virtual memory, not in > the physical one.