From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Phillips Subject: Re: [FYI] tux3: Core changes Date: Fri, 15 May 2015 02:54:48 -0700 Message-ID: <5555C268.4000304@phunq.net> References: <8f886f13-6550-4322-95be-93244ae61045@phunq.net> <55545C2F.8040207@phunq.net> <55549C2F.6000103@redhat.com> <5555388F.5010909@phunq.net> <555562AE.9020204@redhat.com> <20150515080902.GU2462@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Andrea Arcangeli , Peter Zijlstra , tux3@tux3.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, OGAWA Hirofumi To: Mel Gorman , Rik van Riel Return-path: In-Reply-To: <20150515080902.GU2462@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tux3-bounces@phunq.net Sender: "Tux3" List-Id: linux-fsdevel.vger.kernel.org On 05/15/2015 01:09 AM, Mel Gorman wrote: > On Thu, May 14, 2015 at 11:06:22PM -0400, Rik van Riel wrote: >> On 05/14/2015 08:06 PM, Daniel Phillips wrote: >>>> The issue is that things like ptrace, AIO, infiniband >>>> RDMA, and other direct memory access subsystems can take >>>> a reference to page A, which Tux3 clones into a new page B >>>> when the process writes it. >>>> >>>> However, while the process now points at page B, ptrace, >>>> AIO, infiniband, etc will still be pointing at page A. >>>> >>>> This causes the process and the other subsystem to each >>>> look at a different page, instead of at shared state, >>>> causing ptrace to do nothing, AIO and RDMA data to be >>>> invisible (or corrupted), etc... >>> >>> Is this a bit like page migration? >> >> Yes. Page migration will fail if there is an "extra" >> reference to the page that is not accounted for by >> the migration code. > > When I said it's not like page migration, I was referring to the fact > that a COW on a pinned page for RDMA is a different problem to page > migration. The COW of a pinned page can lead to lost writes or > corruption depending on the ordering of events. I see the lost writes case, but not the corruption case, Do you mean corruption by changing a page already in writeout? If so, don't all filesystems have that problem? If RDMA to a mmapped file races with write(2) to the same file, maybe it is reasonable and expected to lose some data. > Page migration fails > when there are unexpected problems to avoid this class of issue which is > fine for page migration but may be a critical failure in a filesystem > depending on exactly why the copy is required. Regards, Daniel