Date: Wed, 26 Oct 2005 14:28:14 -0400 From: David Schultz <das@FreeBSD.ORG> To: nocool <nocool@263.net> Cc: freebsd-hackers <freebsd-hackers@FreeBSD.ORG>, freebsd-current <freebsd-current@FreeBSD.ORG>, delphij <delphij@FreeBSD.ORG> Subject: Re: Re: where to release proc.p_stats Message-ID: <20051026182814.GA52373@VARK.MIT.EDU> In-Reply-To: <20051024134527.31E53F02@smtp.263.net> References: <20051024134527.31E53F02@smtp.263.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 24, 2005, nocool wrote: > Can memory management system utilize COW to supply zero-filled page to kernel or user process. > That is to say: > When processes want zeroed page, we give them a mirror of one already zerod pages. If they just > read, they can read zero from the back page. > We needn't really alloc a new zero-filled page until they modify the page. > So we can saving many time from filling pages with zero, if some process just want read from them. I don't know whether this is done now, but yes, we could do copy-on-write (really, allocate-on-write) for heap pages that have never been written to. But this is a sort of silly optimization that would only affect naive benchmarks. The value stored at a location on the heap that has never been written to is unspecified, so correct applications would never notice this change. Incorrect applications might use fewer pages, but they could also take more traps (one for the read and one for the write), so this change might actually reduce performance.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051026182814.GA52373>