From owner-freebsd-stable@FreeBSD.ORG Fri Dec 16 02:43:23 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA05E106566C for ; Fri, 16 Dec 2011 02:43:23 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB358FC19 for ; Fri, 16 Dec 2011 02:43:22 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so5141756wgb.31 for ; Thu, 15 Dec 2011 18:43:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.131.223 with SMTP id m73mr1957844wei.52.1324001503354; Thu, 15 Dec 2011 18:11:43 -0800 (PST) Received: by 10.223.83.142 with HTTP; Thu, 15 Dec 2011 18:11:43 -0800 (PST) X-Originating-IP: [93.221.183.169] In-Reply-To: References: <4EE1EAFE.3070408@m5p.com> <4EE2AE64.9060802@m5p.com> <4EE88343.2050302@m5p.com> <4EE933C6.4020209@zedat.fu-berlin.de> <20111215004205.GA11556@icarus.home.lan> Date: Fri, 16 Dec 2011 03:11:43 +0100 Message-ID: From: "C. P. Ghost" To: Tom Evans Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org, Jeremy Chadwick Subject: Re: SCHED_ULE should not be the default X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 02:43:23 -0000 On Thu, Dec 15, 2011 at 10:44 AM, Tom Evans wrote: > Real time scheduler changing would be insane! I was thinking that > both/any/all schedulers could be compiled into the kernel, and the > choice of which one to use becomes a boot time configuration. You > don't have to recompile the kernel to change timecounter. Right. Switching the scheduler on the fly may be thinkable though. I could imagine a syscall that would suspend all scheduling, convert the bookkeeping data of one scheduler into the other scheduler's, and transfer control to the other scheduler. Of course, that would require some heavy hacking, as I would imagine that "cross-scheduler surgery" would result in a pretty hard to debug kernel (at least during development). A more general solution could even be a separate userland scheduler process a la L4 [*], but since we don't have lightweight IPC in the kernel (yet, or never), it would require even heavier black wizardry. But nice and flexible it would be. ;-) [*] Refs: - https://github.com/l4ka/pistachio - http://www.systems.ethz.ch/education/past-courses/fall-2010/aos/lectures/wk13-scheduling-print.pdf Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/