From owner-freebsd-fs Tue Sep 12 8:54:29 2000 Delivered-To: freebsd-fs@freebsd.org Received: from wally.eecs.harvard.edu (wally.eecs.harvard.edu [140.247.60.30]) by hub.freebsd.org (Postfix) with ESMTP id 51F5D37B422 for ; Tue, 12 Sep 2000 08:54:23 -0700 (PDT) Received: from localhost (stein@localhost) by wally.eecs.harvard.edu (8.10.0/8.10.0) with ESMTP id e8CFru507417; Tue, 12 Sep 2000 11:53:56 -0400 (EDT) Date: Tue, 12 Sep 2000 11:53:56 -0400 (EDT) From: Christopher Stein X-Sender: stein@wally To: Marius Bendiksen Cc: freebsd-fs@FreeBSD.ORG Subject: Re: how mmap buffer writes handled? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Yes, it appears to be done in vfs_setdirty() of kern/vfs_bio.c Like so: for (i = 0; i < bp->b_npages; i++) { vm_page_flag_clear(bp->b_pages[i], PG_ZERO); vm_page_test_dirty(bp->b_pages[i]); } My concern is that, for mmapped workloads, statistics like nbuf and numdirtybuffers, which are used to set the buf_daemon flush rate, will be meaningless as will the clean and dirty buffer lists. vfs_setdirty is called only from within bdwrite() (delayed write that writes from applications into mmapped buffers will not transit through) and vfs_busy_pages() (called before the physical device strategy routine). How are these data structures and statistics kept meaningful under mmapped workloads? thnx -Chris On Sat, 9 Sep 2000, Marius Bendiksen wrote: > > dirtied by mmap moved onto the dirty queue? IS this done > > synchronously by some kind of software intercept of the > > page table operations or are the buffers moved from the > > clean to dirty queues in the background? > > As I recall, a periodic scan of the "modified" bits of the various page > table entries will be made, and the buffers will be dirtied accordingly > as the scan completes. > > Marius > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message