From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <matthew.r.wilcox@intel.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org,
Yigal Korman <yigal@plexistor.com>, Jan Kara <jack@suse.cz>,
Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified
Date: Tue, 1 Sep 2015 14:10:20 +0300 [thread overview]
Message-ID: <20150901111020.GA7820@node.dhcp.inet.fi> (raw)
In-Reply-To: <55E583E2.9000200@plexistor.com>
On Tue, Sep 01, 2015 at 01:54:26PM +0300, Boaz Harrosh wrote:
> On 09/01/2015 01:22 PM, Kirill A. Shutemov wrote:
> > For VM_PFNMAP and VM_MIXEDMAP we use vm_ops->pfn_mkwrite instead of
> > vm_ops->page_mkwrite to notify abort write access. This means we want
> > vma->vm_page_prot to be write-protected if the VMA provides this vm_ops.
> >
>
> Hi Kirill
>
> I will test with this right away and ACK on this.
>
> Hmm so are you saying we might be missing some buffer modifications right now.
>
> What would be a theoretical scenario that will cause these missed events?
On writable mapping with vm_ops->pfn_mkwrite, but without
vm_ops->page_mkwrite: read fault followed by write access to the pfn.
Writable pte will be set up on read fault and write fault will not be
generated.
I found it examining Dave's complain on generic/080:
http://lkml.kernel.org/g/20150831233803.GO3902@dastard
Although I don't think it's the reason.
> I would like to put a test in our test rigs that should fail today and this
> patch fixes.
>
> [In our system every modified pmem block is also RDMAed to a remote
> pmem for HA, a missed modification will make the two copies unsynced]
It shouldn't be a problem for ext2/ext4 as they provide both pfn_mkwrite
and page_mkwrite.
--
Kirill A. Shutemov
--
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: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <matthew.r.wilcox@intel.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org,
Yigal Korman <yigal@plexistor.com>, Jan Kara <jack@suse.cz>,
Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified
Date: Tue, 1 Sep 2015 14:10:20 +0300 [thread overview]
Message-ID: <20150901111020.GA7820@node.dhcp.inet.fi> (raw)
In-Reply-To: <55E583E2.9000200@plexistor.com>
On Tue, Sep 01, 2015 at 01:54:26PM +0300, Boaz Harrosh wrote:
> On 09/01/2015 01:22 PM, Kirill A. Shutemov wrote:
> > For VM_PFNMAP and VM_MIXEDMAP we use vm_ops->pfn_mkwrite instead of
> > vm_ops->page_mkwrite to notify abort write access. This means we want
> > vma->vm_page_prot to be write-protected if the VMA provides this vm_ops.
> >
>
> Hi Kirill
>
> I will test with this right away and ACK on this.
>
> Hmm so are you saying we might be missing some buffer modifications right now.
>
> What would be a theoretical scenario that will cause these missed events?
On writable mapping with vm_ops->pfn_mkwrite, but without
vm_ops->page_mkwrite: read fault followed by write access to the pfn.
Writable pte will be set up on read fault and write fault will not be
generated.
I found it examining Dave's complain on generic/080:
http://lkml.kernel.org/g/20150831233803.GO3902@dastard
Although I don't think it's the reason.
> I would like to put a test in our test rigs that should fail today and this
> patch fixes.
>
> [In our system every modified pmem block is also RDMAed to a remote
> pmem for HA, a missed modification will make the two copies unsynced]
It shouldn't be a problem for ext2/ext4 as they provide both pfn_mkwrite
and page_mkwrite.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2015-09-01 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 10:22 [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified Kirill A. Shutemov
2015-09-01 10:22 ` Kirill A. Shutemov
2015-09-01 10:22 ` Kirill A. Shutemov
2015-09-01 10:54 ` Boaz Harrosh
2015-09-01 10:54 ` Boaz Harrosh
2015-09-01 10:54 ` Boaz Harrosh
2015-09-01 11:10 ` Kirill A. Shutemov [this message]
2015-09-01 11:10 ` Kirill A. Shutemov
2015-09-01 11:21 ` Boaz Harrosh
2015-09-01 11:21 ` Boaz Harrosh
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=20150901111020.GA7820@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=boaz@plexistor.com \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=matthew.r.wilcox@intel.com \
--cc=yigal@plexistor.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.