From owner-freebsd-current@FreeBSD.ORG Fri Oct 5 02:08:20 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C0816A418; Fri, 5 Oct 2007 02:08:20 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id A27B913C4C3; Fri, 5 Oct 2007 02:08:19 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.103] (c-67-160-44-208.hsd1.wa.comcast.net [67.160.44.208]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l9528ERb099528 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Thu, 4 Oct 2007 22:08:16 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Thu, 4 Oct 2007 19:11:03 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Daniel Eischen In-Reply-To: Message-ID: <20071004190854.I912@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> <20071004182539.H912@10.0.0.1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, "Gelsema, P \(Patrick\) - FreeBSD" Subject: Re: ULE/yielding patch for testing. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2007 02:08:20 -0000 On Thu, 4 Oct 2007, Daniel Eischen wrote: > 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. It effected real-time before. There is a mi_switch() after that priority adjustment. That switch re-adds the thread at the back of the queue for that priority. This patch just removes the priority adjustment for timeshare threads. > > -- > DE > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >