From owner-freebsd-fs Mon Sep 18 23:15:38 2000 Delivered-To: freebsd-fs@freebsd.org Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (Postfix) with ESMTP id 7D87C37B424 for ; Mon, 18 Sep 2000 23:15:36 -0700 (PDT) Received: (from daemon@localhost) by smtp02.primenet.com (8.9.3/8.9.3) id XAA19970; Mon, 18 Sep 2000 23:12:49 -0700 (MST) Received: from usr02.primenet.com(206.165.6.202) via SMTP by smtp02.primenet.com, id smtpdAAAQeaG.M; Mon Sep 18 23:12:43 2000 Received: (from tlambert@localhost) by usr02.primenet.com (8.8.5/8.8.5) id XAA13756; Mon, 18 Sep 2000 23:15:21 -0700 (MST) From: Terry Lambert Message-Id: <200009190615.XAA13756@usr02.primenet.com> Subject: Re: how mmap buffer writes handled? To: mbendiks@eunet.no (Marius Bendiksen) Date: Tue, 19 Sep 2000 06:15:20 +0000 (GMT) Cc: stein@eecs.harvard.edu (Christopher Stein), freebsd-fs@FreeBSD.ORG In-Reply-To: from "Marius Bendiksen" at Sep 13, 2000 03:27:25 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Most architectures that have an MMU, such as the x86, have a bit in their > page tables or equivalent that will indicate whether a page has been > modified since the last time that bit was cleared. This can be sampled and > cleared in one go. > > On architectures lacking an MMU, I think the logical approach would be to > use some of the protection facilities or such to force an exception to be > raised when accessing the page for write, and updating the statistics > based on that. An interesting exception to this is the 386, which will not cause a write fault on a protected page when in protected mode. That means if the kernel craps on the page, it is not correctly seen as being dirty. If you look at the VM code, you will see that the page is actually mapped elsewhere, and the page not present fault is trapped, and then looked up in a translation table, 8-p. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message