From owner-p4-projects@FreeBSD.ORG Sun Oct 14 22:00:23 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F5D316A418; Sun, 14 Oct 2007 22:00:23 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E3B16A419 for ; Sun, 14 Oct 2007 22:00:22 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B529813C44B for ; Sun, 14 Oct 2007 22:00:22 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9EM0Mfp045980 for ; Sun, 14 Oct 2007 22:00:22 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9EM0Mj2045977 for perforce@freebsd.org; Sun, 14 Oct 2007 22:00:22 GMT (envelope-from zec@FreeBSD.org) Date: Sun, 14 Oct 2007 22:00:22 GMT Message-Id: <200710142200.l9EM0Mj2045977@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 127528 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2007 22:00:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=127528 Change 127528 by zec@zec_tpx32 on 2007/10/14 21:59:52 Per-vprocg load average accounting seems to work fine with SCHED_ULE, so remove a stale comment questioning this. Protect reassignment of a loadavg accounting state from one vprocg to another by pinning the thread to current CPU if the kernel was configured to use SCHED_ULE. Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_exit.c#11 edit .. //depot/projects/vimage/src/sys/kern/sched_ule.c#14 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_exit.c#11 (text+ko) ==== @@ -414,7 +414,7 @@ LIST_REMOVE(p, p_list); LIST_INSERT_HEAD(&zombproc, p, p_list); LIST_REMOVE(p, p_hash); -#if defined(VIMAGE) && defined(SCHED_4BSD) /* XXX what about ULE? */ +#if defined(VIMAGE) && defined(SCHED_4BSD) if (p->p_ucred->cr_vimage->v_procg != p->p_pptr->p_ucred->cr_vimage->v_procg) { sched_load_reassign(p->p_ucred->cr_vimage->v_procg, ==== //depot/projects/vimage/src/sys/kern/sched_ule.c#14 (text+ko) ==== @@ -2625,9 +2625,10 @@ void sched_load_reassign(struct vprocg *old, struct vprocg *new) { - /* XXX locking! */ + critical_enter(); old->_tdq_load[curcpu]--; new->_tdq_load[curcpu]++; + critical_exit(); } #endif