Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Aug 1998 16:03:03 -0400 (EDT)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Question on delayed write.
Message-ID:  <Pine.SOL.L3.93.980815154419.23861A-100000@bingsun1>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.980815154419.23861A-100000>