From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 7 02:58:57 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2061016A4D8 for ; Sun, 7 Nov 2004 02:58:57 +0000 (GMT) Received: from pimout1-ext.prodigy.net (pimout1-ext.prodigy.net [207.115.63.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73ECC43D2F for ; Sun, 7 Nov 2004 02:58:56 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [192.168.1.102] (adsl-68-123-122-146.dsl.snfc21.pacbell.net [68.123.122.146])iA72whMt043462; Sat, 6 Nov 2004 21:58:44 -0500 Message-ID: <418D8F62.4000602@elischer.org> Date: Sat, 06 Nov 2004 18:58:42 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8a3) Gecko/20041017 X-Accept-Language: en, hu MIME-Version: 1.0 To: John-Mark Gurney References: <003f01c4c2c5$17e2c560$8a6115ac@dcml.docomolabsusa.com> <20041106192122.GE22681@funkthat.com> In-Reply-To: <20041106192122.GE22681@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD-hackers@freebsd.org cc: Devesh Shah Subject: Re: Loadable Scheduler in Freebsd X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2004 02:58:57 -0000 John-Mark Gurney wrote: > Devesh Shah wrote this message on Thu, Nov 04, 2004 at 15:22 -0800: > >>Based on the SYSINIT framework, I have made ULE scheduler as a loadable module but have not quite >>figured how to migrate from default 4bsd to newly loaded ule scheduler or is it possible at all. > > > As someone suggested, switches schedulers would be very complex.. > > what would be much more doable is require a scheduler module loaded by > loader, and then select which scheduler from the loader... (though I > don't know how many ifdef's outside scheduler modules exist today).. ONE in kern_kse.c: td->td_pflags &= ~TDP_CAN_UNBIND; td2 = thread_schedule_upcall(td, ku); #ifdef SCHED_4BSD if (flags & SW_INVOL || nextthread) { setrunqueue(td2, SRQ_YIELDING); } else { /* Keep up with reality.. we have one extra thread * in the picture.. and it's 'running'. */ return td2; } #else setrunqueue(td2, SRQ_YIELDING); #endif it would be safe to always use the Non-4bsd path >