From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: same page access Date: Wed, 22 Oct 2003 18:10:32 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20031022171032.GS18370@parcelfarce.linux.theplanet.co.uk> References: <1065553341.8172.45.camel@patehci2> <200310221015.17946.mark@lemna.hr> <20031022112128.GN18370@parcelfarce.linux.theplanet.co.uk> <200310221909.58066.mark@lemna.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:24286 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S263539AbTJVRKd (ORCPT ); Wed, 22 Oct 2003 13:10:33 -0400 To: Mark B Content-Disposition: inline In-Reply-To: <200310221909.58066.mark@lemna.hr> List-Id: linux-fsdevel.vger.kernel.org On Wed, Oct 22, 2003 at 07:09:58PM +0200, Mark B wrote: > Mmm sorry I formulated the question a bit wrong, here's the correction; > I know that the data what was read() before the write() can't be affected, > it's a perfectly normal condition, but I'm talking about the page of data the > kernel loaded in the VFS for that file handle, is the data the same copy of > data that is served to other processes? So a read() by P1 after P2 has did a > write() in the same area, will it lead to a reload of the page since the P2 > marked the area dirty? Or simply they're working on the same memory page? Is > there any locking (by commit_write()?) They're working from the same memory page (in the page cache). This same page is also shared with any process that has a shared mmap. -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk