Re: cvs commit: src/sys/vm vm_map.c vm_map.h vm_pageout.c

[ Available lists | Index of cvs-src | Month of Mar 2003 | Week of 13 Mar 2003 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Mike Silbersack <silby@silby.com>
Date
13 Mar 2003 15:18:10
Subject
Re: cvs commit: src/sys/vm vm_map.c vm_map.h vm_pageout.c
Message-ID
20030313170814.K682@odysseus.silby.com


[ Hide this part ]
 
On Thu, 13 Mar 2003, Alfred Perlstein wrote:

> * Mike Silbersack <silby@silby.com> [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



Elapsed time: 0.089 seconds