From owner-cvs-all Fri Oct 12 11:17:41 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0D29837B40A; Fri, 12 Oct 2001 11:17:35 -0700 (PDT) Received: (from dillon@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9CIHYU38714; Fri, 12 Oct 2001 11:17:34 -0700 (PDT) (envelope-from dillon) Message-Id: <200110121817.f9CIHYU38714@freefall.freebsd.org> From: Matt Dillon Date: Fri, 12 Oct 2001 11:17:34 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/vm vnode_pager.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dillon 2001/10/12 11:17:34 PDT Modified files: sys/vm vnode_pager.c Log: Finally fix the VM bug where a file whos EOF occurs in the middle of a page would sometimes prevent a dirty page from being cleaned, even when synced, resulting in the dirty page being re-flushed to disk every 30-60 seconds or so, forever. The problem is that when the filesystem flushes a page to its backing file it typically does not clear dirty bits representing areas of the page that are beyond the file EOF. If the file is also mmap()'d and a fault is taken, vm_fault (properly, is required to) set the vm_page_t->dirty bits to VM_PAGE_BITS_ALL. This combination could leave us with an uncleanable, unfreeable page. The solution is to have the vnode_pager detect the edge case and manually clear the dirty bits representing areas beyond the file EOF. The filesystem does the rest and the page comes up clean after the write completes. MFC after: 3 days Revision Changes Path 1.138 +22 -4 src/sys/vm/vnode_pager.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message