From owner-cvs-all Wed Oct 9 10:17:26 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5777537B401; Wed, 9 Oct 2002 10:17:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E69BB43E65; Wed, 9 Oct 2002 10:17:24 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (jhb@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g99HHOCo063853; Wed, 9 Oct 2002 10:17:24 -0700 (PDT) (envelope-from jhb@freefall.freebsd.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g99HHOVa063852; Wed, 9 Oct 2002 10:17:24 -0700 (PDT) Message-Id: <200210091717.g99HHOVa063852@freefall.freebsd.org> From: John Baldwin Date: Wed, 9 Oct 2002 10:17:24 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern init_main.c kern_resource.c kern_synch.c subr_trap.c src/sys/sys proc.h resourcevar.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2002/10/09 10:17:24 PDT Modified files: sys/kern init_main.c kern_resource.c kern_synch.c subr_trap.c sys/sys proc.h resourcevar.h Log: - Move p_cpulimit to struct proc from struct plimit and protect it with sched_lock. This means that we no longer access p_limit in mi_switch() and the p_limit pointer can be protected by the proc lock. - Remove PRS_ZOMBIE check from CPU limit test in mi_switch(). PRS_ZOMBIE processes don't call mi_switch(), and even if they did there is no longer the danger of p_limit being NULL (which is what the original zombie check was added for). - When we bump the current processes soft CPU limit in ast(), just bump the private p_cpulimit instead of the shared rlimit. This fixes an XXX for some value of fix. There is still a (probably benign) bug in that this code doesn't check that the new soft limit exceeds the hard limit. Inspired by: bde (2) Revision Changes Path 1.213 +1 -1 src/sys/kern/init_main.c 1.111 +3 -4 src/sys/kern/kern_resource.c 1.203 +2 -8 src/sys/kern/kern_synch.c 1.234 +4 -3 src/sys/kern/subr_trap.c 1.268 +1 -0 src/sys/sys/proc.h 1.30 +0 -1 src/sys/sys/resourcevar.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message