Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Nov 2004 18:58:42 -0800
From:      Julian Elischer <julian@elischer.org>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        Devesh Shah <shah@docomolabs-usa.com>
Subject:   Re: Loadable Scheduler in Freebsd
Message-ID:  <418D8F62.4000602@elischer.org>
In-Reply-To: <20041106192122.GE22681@funkthat.com>
References:  <003f01c4c2c5$17e2c560$8a6115ac@dcml.docomolabsusa.com> <20041106192122.GE22681@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?418D8F62.4000602>