All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Matt Mackall <mpm@selenic.com>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] mm: Save soft-dirty bits on file pages
Date: Sat, 27 Jul 2013 23:29:36 +0400	[thread overview]
Message-ID: <51F41FA0.6060205@parallels.com> (raw)
In-Reply-To: <CALCETrUJa-Y40vnb6YOPry0dCXb3zCQ0y19i2yHWdzKR75HUzg@mail.gmail.com>

On 07/27/2013 12:55 AM, Andy Lutomirski wrote:
> On Fri, Jul 26, 2013 at 1:18 PM, Cyrill Gorcunov <gorcunov@gmail.com> 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
> .
> 


--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelyanov <xemul@parallels.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Matt Mackall <mpm@selenic.com>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] mm: Save soft-dirty bits on file pages
Date: Sat, 27 Jul 2013 23:29:36 +0400	[thread overview]
Message-ID: <51F41FA0.6060205@parallels.com> (raw)
In-Reply-To: <CALCETrUJa-Y40vnb6YOPry0dCXb3zCQ0y19i2yHWdzKR75HUzg@mail.gmail.com>

On 07/27/2013 12:55 AM, Andy Lutomirski wrote:
> On Fri, Jul 26, 2013 at 1:18 PM, Cyrill Gorcunov <gorcunov@gmail.com> 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
> .
> 



  parent reply	other threads:[~2013-07-27 19:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 20:18 [PATCH] mm: Save soft-dirty bits on file pages Cyrill Gorcunov
2013-07-26 20:18 ` Cyrill Gorcunov
2013-07-26 20:55 ` Andy Lutomirski
2013-07-26 20:55   ` Andy Lutomirski
2013-07-26 21:18   ` Cyrill Gorcunov
2013-07-26 21:18     ` Cyrill Gorcunov
2013-07-26 21:36     ` Andy Lutomirski
2013-07-26 21:36       ` Andy Lutomirski
2013-07-27  6:25       ` Cyrill Gorcunov
2013-07-27  6:25         ` Cyrill Gorcunov
2013-07-27 17:06         ` Andy Lutomirski
2013-07-27 17:06           ` Andy Lutomirski
2013-07-27 21:01           ` Cyrill Gorcunov
2013-07-27 21:01             ` Cyrill Gorcunov
2013-07-27 19:29   ` Pavel Emelyanov [this message]
2013-07-27 19:29     ` Pavel Emelyanov
2013-07-28  9:28     ` Pavel Emelyanov
2013-07-28  9:28       ` Pavel Emelyanov
2013-07-29 14:08 ` Pavel Emelyanov
2013-07-29 14:08   ` Pavel Emelyanov
2013-07-29 14:14   ` Cyrill Gorcunov
2013-07-29 14:14     ` Cyrill Gorcunov
2013-07-29 14:24     ` Pavel Emelyanov
2013-07-29 14:24       ` Pavel Emelyanov
2013-07-29 14:36       ` Cyrill Gorcunov
2013-07-29 14:36         ` Cyrill Gorcunov
2013-07-29 14:58     ` Aneesh Kumar K.V
2013-07-29 14:58       ` Aneesh Kumar K.V
2013-07-29 15:02       ` Cyrill Gorcunov
2013-07-29 15:02         ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F41FA0.6060205@parallels.com \
    --to=xemul@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mpm@selenic.com \
    --cc=mtosatti@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=xiaoguangrong@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.