Date: Sat, 25 Jan 2003 17:14:33 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Jeff Roberson <jroberson@chesapeake.net>, Steve Kargl <sgk@troutmask.apl.washington.edu>, Robert Watson <rwatson@FreeBSD.ORG>, Gary Jennejohn <garyj@jennejohn.org>, <arch@FreeBSD.ORG> Subject: Re: New scheduler (#3) Message-ID: <200301260114.h0Q1EXuu017546@apollo.backplane.com> References: <20030125171217.D18109-100000@mail.chesapeake.net> <200301252320.h0PNKVoq090077@apollo.backplane.com> <200301252350.h0PNo6xO009489@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301260114.h0Q1EXuu017546>