From owner-freebsd-arch Sat Jan 25 17:14:37 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16CF437B401; Sat, 25 Jan 2003 17:14:35 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D74A43ED8; Sat, 25 Jan 2003 17:14:35 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h0Q1EY0i017547; Sat, 25 Jan 2003 17:14:34 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.6/8.12.6/Submit) id h0Q1EXuu017546; Sat, 25 Jan 2003 17:14:33 -0800 (PST) Date: Sat, 25 Jan 2003 17:14:33 -0800 (PST) From: Matthew Dillon Message-Id: <200301260114.h0Q1EXuu017546@apollo.backplane.com> To: Jeff Roberson , Steve Kargl , Robert Watson , Gary Jennejohn , Subject: Re: New scheduler (#3) References: <20030125171217.D18109-100000@mail.chesapeake.net> <200301252320.h0PNKVoq090077@apollo.backplane.com> <200301252350.h0PNo6xO009489@apollo.backplane.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Found another bug. In sched_sleep() you set td_slptime to ticks in order to calculate the time slept in sched_wakeup(). You have to do the same thing in sched_switchout() (or move it to sched_switchout()?), because not all kernel subsystems use msleep(). For example, select() does it manually and uses mi_switch(), which means that sched_sleep() is never called. (select() uses condvars which use mi_switch(). The wakeup portion in the condvar code will use sched_wakeup() so no additional changes are required on the wakeup side). This could be contributing to why people's X servers are blowing up... it's because your scheduler thinks the X server never sleeps so the priority remains artifically high even if the X server is mostly idle. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message