From owner-freebsd-arch Sat Jan 25 22:25: 9 2003 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 F105F37B401; Sat, 25 Jan 2003 22:25:07 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BA7043ED8; Sat, 25 Jan 2003 22:25:07 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h0Q6Ox0i025785; Sat, 25 Jan 2003 22:24:59 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.6/8.12.6/Submit) id h0Q6OxSl025784; Sat, 25 Jan 2003 22:24:59 -0800 (PST) Date: Sat, 25 Jan 2003 22:24:59 -0800 (PST) From: Matthew Dillon Message-Id: <200301260624.h0Q6OxSl025784@apollo.backplane.com> To: Julian Elischer Cc: Jeff Roberson , Steve Kargl , Robert Watson , Gary Jennejohn , arch@FreeBSD.ORG Subject: Re: New scheduler - Interactivity fixes References: Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Although... it might be even better if we could specify no schedulers in the kernel build and then load one as a boot-time module. Or if we could load several schedulers at compile-time (i.e. all their functions and globals would be static and they would register via a SYS entry) and allow the scheduler to be selected with a boot-time variable. That might dovetail into a methodology to allow schedulers to be switched on the fly. I've thought about that a bit and it occurs to me that run-time switching a scheduler does not require that a common runq methodology be used. Instead we simply have an API call that allows the kernel to 'collect' all the queued KSEs into a single queue and then reallocate their sub-structures and re-add them to the new scheduler. /* * Ask the scheduler to pull off all the KSEs on its runq or runqs * (for all cpu's) and place them in colq. The kernel will call this * function prior to switching to a new scheduler. The scheduler * is also expected to cleanup any other auxillary management it * had initialized. */ void sched_collect(struct rqhead *colq) { } /* * Ask the scheduler to emplace all the KSEs on colq back onto the * appropriate scheduler-specific run queue. This function is called * after the kernel initializes the new scheduler and assigns new * empty substructures to the KSE,KSEGs,etc... as per the new scheduler. */ void sched_restore(struct rqhead *colq) { } -Matt :(Julian) :I think that the option should be set up so that no option gives the :current scheduler. : :On Sun, 26 Jan 2003, Jeff Roberson wrote: : :> In a moment I'm adding some config options to handle this. I sent some :> mail out to current@ and I'm adding a line to updating. This has all gone :> through re. You will be required to specify one of SCHED_4BSD or :> SCHED_ULE (new name for sched_smp) in your config file. I went away from :> sched_smp because it should be a very effective up scheduler as well. :> :> Cheers, :> Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message