Date: Tue, 12 Sep 2000 11:53:56 -0400 (EDT) From: Christopher Stein <stein@eecs.harvard.edu> To: Marius Bendiksen <mbendiks@eunet.no> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: how mmap buffer writes handled? Message-ID: <Pine.OSF.4.20.0009121146440.13225-100000@wally> In-Reply-To: <Pine.BSF.4.05.10009090805310.63380-100000@login-1.eunet.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.20.0009121146440.13225-100000>