Date: Sat, 25 Jan 2003 22:08:58 -0500 (EST) From: Jeff Roberson <jroberson@chesapeake.net> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: 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: <20030125220657.N18109-100000@mail.chesapeake.net> In-Reply-To: <200301260114.h0Q1EXuu017546@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 25 Jan 2003, Matthew Dillon wrote: > 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). > I want the sleep time to ONLY reflect voluntary sleep time. Thats why it was only done in sched_sleep(). It looks like I might have to add it to either select or the condvar code. I think that perhaps adding it to condvar would be correct since that is a voluntary sleep. Good catch. thanks. > 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?20030125220657.N18109-100000>