From owner-freebsd-arch@FreeBSD.ORG Sun Sep 26 03:50:48 2004 Return-Path: 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 8D6A216A4CE for ; Sun, 26 Sep 2004 03:50:47 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A08543D39 for ; Sun, 26 Sep 2004 03:50:47 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-67-124-49-205.dsl.snfc21.pacbell.net [67.124.49.205])i8Q3orCE026142; Sat, 25 Sep 2004 23:50:54 -0400 Message-ID: <41563C95.2020501@elischer.org> Date: Sat, 25 Sep 2004 20:50:45 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Stephan Uphoff References: <1095468747.31297.241.camel@palm.tree.com> <414B8D5E.7000700@elischer.org> <1095529353.31297.1192.camel@palm.tree.com> <1096135220.53798.17754.camel@palm.tree.com> In-Reply-To: <1096135220.53798.17754.camel@palm.tree.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: peter@holm.cc cc: "freebsd-arch@freebsd.org" Subject: Re: scheduler (sched_4bsd) questions X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2004 03:50:48 -0000 Stephan Uphoff wrote: >>Maybe something brutal like: >> if ((curthread->td_ksegrp == kg) && >> (td->td_priority > curthread->td_priority)) >> curthread->td_flags |= TDF_NEEDRESCHED; >> >>in setrunqueue for >>the else case of "if (kg->kg_avail_opennings > 0)" >>would do the trick (without preemption) for the easy but probably more >>common cases? >> >>Maybe I can find some time next week to think about a clean >>fix. I find it always helpful having a small task in mind while reading >>source code. > > > I wrote a fix that should cover all cases. > However I would like to test it a little bit before posting the patch. > Is there any multi-threaded kernel torture program that you can > recommend? Peter Holm (CC'd) has a really cool set of torture tests. he has also seen all sorts of failures others have not (yet) triggered. :-) I'm 'busy" for the next couple of weeks so you may want to communicate directly with him and see if you and he together can figure out some of the things he's been seeing :-) his tests are at: http://www.holm.cc/stress/src/stress.tgz > > Thanks > > Stephan >