From owner-freebsd-hackers Wed Nov 20 13:52:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B302737B401 for ; Wed, 20 Nov 2002 13:52:42 -0800 (PST) Received: from niwun.pair.com (niwun.pair.com [209.68.2.70]) by mx1.FreeBSD.org (Postfix) with SMTP id E585C43E3B for ; Wed, 20 Nov 2002 13:52:41 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 45792 invoked by uid 3193); 20 Nov 2002 21:52:41 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Nov 2002 21:52:41 -0000 Date: Wed, 20 Nov 2002 16:52:41 -0500 (EST) From: Mike Silbersack X-X-Sender: silby@niwun.pair.com To: Tony Finch Cc: dschultz@uclink.Berkeley.EDU, Subject: Re: cvs commit: src/bin/sleep sleep.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 20 Nov 2002, Tony Finch wrote: > David Schultz wrote: > > > >BSS and modified data are not shared, and Matt is only counting > >zero fill and COW faults. > > Most of the BSS is mmapped zero pages that are copy-on-write, so in simple > programs they should be mostly shared. See rtld-elf/map_object.c > > Tony. I'm curious how well COW sharing really works under FreeBSD. Earlier this year, I fixed a piece of code which was O((processes sharing a page)^2) in the VM system. When certain simple forkbombs were run, they would cause the machine to freeze for 30 seconds at a time or more once the VM cleanup routines kicked in and ran the O(N^2) piece of code. What bugged me at the time was that I couldn't seem to reproduce the problem with other programs... this led me to believe that we aren't really sharing too many pages in common use, but I didn't have time to investigate if that was true or not. Someone with an interest in VM implementations might want to take a wander through and see how well page sharing really works on a typical FreeBSD system. :) Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message