From owner-cvs-all@FreeBSD.ORG Tue Oct 2 01:30:18 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33D716A41A; Tue, 2 Oct 2007 01:30:18 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B04A213C447; Tue, 2 Oct 2007 01:30:18 +0000 (UTC) (envelope-from jeff@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 l921UIn4070522; Tue, 2 Oct 2007 01:30:18 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l921UIfM070521; Tue, 2 Oct 2007 01:30:18 GMT (envelope-from jeff) Message-Id: <200710020130.l921UIfM070521@repoman.freebsd.org> From: Jeff Roberson Date: Tue, 2 Oct 2007 01:30:18 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern sched_ule.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 02 Oct 2007 01:30:18 -0000 jeff 2007-10-02 01:30:18 UTC FreeBSD src repository Modified files: sys/kern sched_ule.c Log: - Reassign the thread queue lock to newtd prior to switching. Assigning after the switch leads to a race where the outgoing thread still owns the local queue lock while another cpu may switch it in. This race is only possible on machines where cpu_switch can take significantly longer on different cpus which in practice means HTT machines with unfair thread scheduling algorithms. Found by: kris (of course) Approved by: re Revision Changes Path 1.212 +6 -4 src/sys/kern/sched_ule.c