From owner-freebsd-hackers Sat Aug 15 16:33:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA02310 for freebsd-hackers-outgoing; Sat, 15 Aug 1998 16:33:32 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA02305 for ; Sat, 15 Aug 1998 16:33:30 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id QAA20267; Sat, 15 Aug 1998 16:32:49 -0700 (PDT) Message-Id: <199808152332.QAA20267@implode.root.com> To: zhihuizhang cc: hackers Subject: Re: Question on delayed write. In-reply-to: Your message of "Sat, 15 Aug 1998 16:03:03 EDT." From: David Greenman Reply-To: dg@root.com Date: Sat, 15 Aug 1998 16:32:49 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >The comment in vfs_clean_pages() in vfs_bio.c says we can set the pages in >a buffer clean to avoid VM intervention and I am quite confused with this. > >(1) Even if the field valid/dirty in vm_page structure are set to be zero, >the pageout process can get the current dirty/clean status directly from >the PTE and then write the whole page to disk. The code is: > > If (m->dirty == 0) vm_page_test_dirty(); > >(2) When there is a page shortage, the pages of the buffer can be >reclaimed without being written to disk (because we have declared them as >clean). If this happens before the delayed write happens, it will lose >data. (active pages can become inactive pages) > >Any help is appreciated. The pageout daemon won't touch pages that are attached to buffers. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message