From owner-cvs-all@FreeBSD.ORG Thu Jul 17 19:46:30 2003 Return-Path: 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 D009837B401; Thu, 17 Jul 2003 19:46:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ED8D43F75; Thu, 17 Jul 2003 19:46:30 -0700 (PDT) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6I2kU0U063970; Thu, 17 Jul 2003 19:46:30 -0700 (PDT) (envelope-from deischen@repoman.freebsd.org) Received: (from deischen@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6I2kU1s063969; Thu, 17 Jul 2003 19:46:30 -0700 (PDT) Message-Id: <200307180246.h6I2kU1s063969@repoman.freebsd.org> From: Daniel Eischen Date: Thu, 17 Jul 2003 19:46:30 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libpthread/thread thr_cond.c thr_mutex.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2003 02:46:31 -0000 deischen 2003/07/17 19:46:30 PDT FreeBSD src repository Modified files: lib/libpthread/thread thr_cond.c thr_mutex.c Log: Add a preemption point when a mutex or condition variable is handed-off/signaled to a higher priority thread. Note that when there are idle KSEs that could run the higher priority thread, we still add the preemption point because it seems to take the kernel a while to schedule an idle KSE. The drawbacks are that threads will be swapped more often between CPUs (KSEs) and that there will be an extra userland context switch (the idle KSE is still woken and will probably resume the preempted thread). We'll revisit this if and when idle CPU/KSE wakeup times improve. Inspired by: Petri Helenius Reviewed by: davidxu Revision Changes Path 1.47 +8 -0 src/lib/libpthread/thread/thr_cond.c 1.38 +10 -6 src/lib/libpthread/thread/thr_mutex.c