Date: Sun, 14 Oct 2007 22:00:22 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127528 for review Message-ID: <200710142200.l9EM0Mj2045977@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710142200.l9EM0Mj2045977>