Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751589AbbEZHJV (ORCPT ); Tue, 26 May 2015 03:09:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39787 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbbEZHJT (ORCPT ); Tue, 26 May 2015 03:09:19 -0400 Date: Tue, 26 May 2015 09:09:10 +0200 From: Jan Kara To: Daniel Phillips Cc: David Lang , Rik van Riel , Jan Kara , linux-fsdevel@vger.kernel.org, tux3@tux3.org, linux-kernel@vger.kernel.org, OGAWA Hirofumi Subject: Re: [FYI] tux3: Core changes Message-ID: <20150526070910.GA3307@quack.suse.cz> References: <555CB4B6.8050305@phunq.net> <555CE62C.5030202@redhat.com> <555D0FDF.3070303@phunq.net> <555D500B.4080901@phunq.net> <13c8bcdf-70e8-43d5-a05f-58ad839dbfd0@phunq.net> <5563F5C8.2040806@redhat.com> <67294911-1776-46b8-916d-0e5642a38725@phunq.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67294911-1776-46b8-916d-0e5642a38725@phunq.net> 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 Content-Length: 1366 Lines: 31 On Mon 25-05-15 23:11:11, Daniel Phillips wrote: > On Monday, May 25, 2015 11:04:39 PM PDT, David Lang wrote: > >if the page gets modified again, will that cause any issues? what > >if the page gets modified before the copy gets written out, so > >that there are two dirty copies of the page in the process of > >being written? > > > >David Lang > > How is the page going to get modified again? A forked page isn't > mapped by a pte, so userspace can't modify it by mmap. The forked > page is not in the page cache, so usespace can't modify it by > posix file ops. So the writer would have to be in kernel. Tux3 > knows what it is doing, so it won't modify the page. What kernel > code besides Tux3 will modify the page? E.g. video drivers (or infiniband or direct IO for that matter) which have buffers in user memory (may be mmapped file), grab references to pages and hand out PFNs of those pages to the hardware to store data in them... If you fork a page after the driver has handed PFNs to the hardware, you've just lost all the writes hardware will do. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/