Date: Wed, 23 Jun 2004 09:48:24 +0800 From: David Xu <davidxu@freebsd.org> To: Bruce Evans <bde@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_exit.c Message-ID: <40D8E168.4050007@freebsd.org> In-Reply-To: <200406211403.i5LE3cJR022889@repoman.freebsd.org> References: <200406211403.i5LE3cJR022889@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: >bde 2004-06-21 14:49:50 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_exit.c > Log: > (1) Removed the bogus condition "p->p_pid != 1" on calling >sched_exit() > from exit1(). sched_exit() must be called unconditionally from >exit1(). > It was called almost unconditionally because the only exits on >system > shutdown if at all. > > (2) Removed the comment that presumed to know what sched_exit() does. > sched_exit() does different things for the ULE case. The call >became > essential when it started doing load average stuff, but its caller > should not know that. But this change loses a semantic, in most time, init is waitting there to recycle runnaway processes, those process were not created by init, if you call sched_exit for init unconditionally, the runnaway process's cpu usage are all merged into init, this is unfair for init, is there any benifit to lower init's priority under load to slow down recycling speed ? I don't think so. I think scheduler's sched_exit should be fixed at same time to keep this semantic. David Xu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40D8E168.4050007>