From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Van Hensbergen Subject: mmap question Date: Mon, 21 Mar 2005 16:57:37 -0600 Message-ID: References: Reply-To: Eric Van Hensbergen Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Received: from wproxy.gmail.com ([64.233.184.193]:31633 "EHLO wproxy.gmail.com") by vger.kernel.org with ESMTP id S262185AbVCUW5j (ORCPT ); Mon, 21 Mar 2005 17:57:39 -0500 Received: by wproxy.gmail.com with SMTP id 68so1144746wra for ; Mon, 21 Mar 2005 14:57:38 -0800 (PST) To: linux-fsdevel@vger.kernel.org In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 21 Mar 2005 13:33:55 -0800, Bryan Henderson wrote: > >I want all my file system's operations to be complete uncached and > >synchronous, but I also want to support mmap. > >... > >What am I doing wrong? Is what I'm trying to do impossible, and if > >so, how can I get as close as possible? > > It looks to me like you're running into the fundamental limitation that > the CPU doesn't notify Linux every time you store into a memory location. > It does, though, set the dirty flag in the page table, and Linux > eventually inspects that flag and finds out that you have stored in the > past. At that time, it can call set_page_dirty. > Is there an existing interface to force it to check if the page is dirty -- for example, one way to maintain coherency would be for my normal read/write path to check if the page is dirty and write it back and invalidate the page before executing the normal-path read/write. This may be an unlikely scenerio, but I think it is one of the corner cases fsx tickles. -eric