From owner-cvs-src Thu Mar 13 15:18:10 2003 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 E289437B404 for ; Thu, 13 Mar 2003 15:18:06 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 62D1243FA3 for ; Thu, 13 Mar 2003 15:18:04 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 45724 invoked from network); 13 Mar 2003 23:18:03 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 13 Mar 2003 23:18:03 -0000 X-pair-Authenticated: 209.68.2.70 Date: Thu, 13 Mar 2003 17:14:54 -0600 (CST) From: Mike Silbersack To: Alfred Perlstein Cc: David Schultz , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_map.c vm_map.h vm_pageout.c In-Reply-To: <20030313224223.GP4145@elvis.mu.org> Message-ID: <20030313170814.K682@odysseus.silby.com> References: <200303122313.h2CNDHMU046431@repoman.freebsd.org> <20030312175458.J32334@odysseus.silby.com> <20030313005115.GA11794@HAL9000.homeunix.com> <20030313154226.X682@odysseus.silby.com> <20030313224223.GP4145@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 13 Mar 2003, Alfred Perlstein wrote: > * Mike Silbersack [030313 13:49] wrote: > > > > Well, back when I was running tests, I found that if you had 1000s of > > processes running, the kill signal could take so long to get delivered and > > acted upon that the same process might have to be killed by the pageout > > daemon 3-4 times before it actually died. > > Shooting from the hip here, but why not just forcefully toss away the > process's vmspace or a subset of it? Basically have the pageout > deamon deallocate the "to be killed" process's address space? > > -Alfred I think I had considered something along those lines at the time. The main reason I didn't do anything like that was because I didn't have the VM-fu to pull it off. :) If it could be done safely, I think that it would be a good solution. I wonder if doing that would cause the process to show up as killed by sig 9 or sig 11. I guess it doesn't matter too much either way. Oh, there might be one slight race issue if the vmspace is deallocated, but the process isn't actually killed until later. If you have some mad forkbomb like thing eating up memory, you could still have new processes being created before the old de-vmspace'd ones are killed. Hence, you'd run up many zombieish processes. Of course, we actually have process limits that work, so I don't think it'd be a real issue. Yeah, I think that your idea would work decently. If someone wants to code it up, I'll dig up the code I was using as the stress test which showed some deadlock last year before I put in those micro-hacks to solve it. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message