Date: Thu, 4 Oct 2007 21:32:07 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: freebsd-current@freebsd.org, "Gelsema, P \(Patrick\) - FreeBSD" <freebsd@superhero.nl> Subject: Re: ULE/yielding patch for testing. Message-ID: <Pine.GSO.4.64.0710042127170.11107@sea.ntplx.net> In-Reply-To: <20071004182539.H912@10.0.0.1> References: <20071002165007.D587@10.0.0.1> <20071003110727.411aa2de@pleiades.nextvenue.com> <2155.10.202.77.103.1191443576.squirrel@webmail.superhero.nl> <20071004174044.E912@10.0.0.1> <Pine.GSO.4.64.0710042051500.11107@sea.ntplx.net> <20071004182539.H912@10.0.0.1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Oct 2007, Jeff Roberson wrote: > On Thu, 4 Oct 2007, Daniel Eischen wrote: > >> On Thu, 4 Oct 2007, Jeff Roberson wrote: >> >>> >>> I believe I have fixed this bug in the enclosed patch. It is rooted from >>> /usr/src/sys so you should cd there to apply it. >> >> This doesn't break realtime threads doing a sched_yield() does >> it? I couldn't easily see how the priority gets set back into >> the realtime class range. But then, maybe I'm a dummy ;-) > > Well the historical behavior was for sched_yield() to not adjust priorities. > It just requeues at the back of the queue for that priority. Xu changed this > in 7.0 but he didn't answer my mail as to why. We have a yield() call that > does drop to the max timeshare priority, however, it doesn't seem to have a > man page. > > The code removed was this: > > - if (td->td_pri_class == PRI_TIMESHARE) > - sched_prio(td, PRI_MAX_TIMESHARE); > > > So it really only effected timesharing threads. As I read the change, now it affects real-time (which is the desired behavior since it is a POSIX real-time extension). But it should have POSIX-defined behavior, which is to requeue at the back of the queue for that priority. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0710042127170.11107>