From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Danilov Subject: Re: Writing out a (file) mmapped page Date: Tue, 14 Jun 2005 20:37:45 +0400 Message-ID: <17071.2009.722920.324990@gargle.gargle.HOWL> References: <8e70aacf050612094916d32276@mail.gmail.com> <1118763383.16269.61.camel@imp.csi.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from [80.71.243.242] ([80.71.243.242]:12502 "EHLO tau.rusteko.ru") by vger.kernel.org with ESMTP id S261238AbVFNQhp (ORCPT ); Tue, 14 Jun 2005 12:37:45 -0400 To: Anton Altaparmakov In-Reply-To: <1118763383.16269.61.camel@imp.csi.cam.ac.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Anton Altaparmakov writes: [...] > > That is a little trickier than one might expect because it is partially > done in hardware (heavily arch dependent though). > > When a write to a writable mmapped page happens the CPU sets the page > dirty flag in hardware. So there is no code where you can see this > happen. Later on, at msync() time or munmap() time, this hardware dirty > bit results in a set_page_dirty() being called which for buffer based This also happens when page migrates to the cold end of "VM LRU list" (tail of the inactive list, technically). Nikita.