From owner-freebsd-hackers Sat Aug 15 13:03:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA03333 for freebsd-hackers-outgoing; Sat, 15 Aug 1998 13:03:40 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bingsun1.cc.binghamton.edu (bingsun1.cc.binghamton.edu [128.226.1.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA03325 for ; Sat, 15 Aug 1998 13:03:36 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun1.cc.binghamton.edu (8.8.7/8.6.9) with SMTP id QAA24017 for ; Sat, 15 Aug 1998 16:03:04 -0400 (EDT) Date: Sat, 15 Aug 1998 16:03:03 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun1 To: hackers Subject: Question on delayed write. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message