From owner-cvs-src@FreeBSD.ORG Thu May 6 08:30:35 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 671E916A4CE; Thu, 6 May 2004 08:30:35 -0700 (PDT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40C2443D41; Thu, 6 May 2004 08:30:32 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i46FUV4u001994; Fri, 7 May 2004 01:30:31 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i46FUSHW007977; Fri, 7 May 2004 01:30:29 +1000 Date: Fri, 7 May 2004 01:30:27 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alan Cox In-Reply-To: <200405060503.i4653OfT061105@repoman.freebsd.org> Message-ID: <20040507010151.I21163@gamplex.bde.org> References: <200405060503.i4653OfT061105@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/nwfs nwfs_io.c src/sys/fs/smbfssmbfs_io.c src/sys/fs/specfs spec_vnops.c src/sys/kern uipc_syscalls.c vfs_bio.c src/sys/nfsclient nfs_bio.c src/sys/vm swap_page X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2004 15:30:35 -0000 On Wed, 5 May 2004, Alan Cox wrote: > alc 2004/05/05 22:03:24 PDT > > FreeBSD src repository > > Modified files: > sys/fs/nwfs nwfs_io.c > sys/fs/smbfs smbfs_io.c > sys/fs/specfs spec_vnops.c > sys/kern uipc_syscalls.c vfs_bio.c > sys/nfsclient nfs_bio.c > sys/vm swap_pager.c vm_fault.c vnode_pager.c > Log: > Make vm_page's PG_ZERO flag immutable between the time of the page's > allocation and deallocation. This flag's principal use is shortly after > allocation. For such cases, clearing the flag is pointless. The only > unusual use of PG_ZERO is in vfs_bio_clrbuf(). However, allocbuf() never > requests a prezeroed page. So, vfs_bio_clrbuf() never sees a prezeroed ^^^^^ rarely(?) > page. > > Reviewed by: tegge@ The request for a prezeroed page is just a preference, so vfs_bio_clrbuf() certainly gets prezeroed pages. This happens whenever there are only prezeroed pages to find. I think vfs_bio_clrbuf() sees them too. It saw them at least once a few years ago when my debugging code for this finally triggered. My kernel at the time had colorizing optimizations that probably made using a prezeroed page more likely. The PG_ZERO optimizations in vfs_bio_clrbuf() were just worse than useless because they rarely applied (and they break immutability here). Bruce