From owner-freebsd-arch Wed Jul 17 10:36:44 2002 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 22BC537B400 for ; Wed, 17 Jul 2002 10:36:39 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD85C43E3B for ; Wed, 17 Jul 2002 10:36:38 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 19441 invoked from network); 17 Jul 2002 17:36:37 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 17 Jul 2002 17:36:37 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6HHaZ057524; Wed, 17 Jul 2002 13:36:35 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020716235216.B6785@iguana.icir.org> Date: Wed, 17 Jul 2002 13:36:40 -0400 (EDT) From: John Baldwin To: Luigi Rizzo Subject: RE: proposed changes to kern_switch.c and kern_synch.c Cc: arch@freebsd.org 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 On 17-Jul-2002 Luigi Rizzo wrote: > Hi, > we have implemented a weight-based process scheduler > for FreeBSD-stable, and are trying to port it to -current (in the > description below replace "process" with "thread/kse" as appropriate > for the -current case). Unfortunately, the differences between -current and -stable in this area aren't that simple. I think while developing on this on -stable is fine, trying to retrofit those changes into -current will be fairly hard. Mostly because you basically need to rewrite a lot of it. The current scheduler is still very much a work in progress and I think we need to not try to do too many things at once. Some remaining issues that I think need to be done first before we look into this: - Finish up KSE changes - Really make the scheduler fully preemptive - Get rid of schedcpu() in favor of event-driven priority updates somewhat similar to SVR4 as described in Unix Internals - A few other simplifications would be to have things like turnstiles and generic sleep queues shared between at least cv's and sleep/wakeup, possibly with turnstiles as well. Some other notes: I think kern_switch.c should just contain the code to support processor runqueues and possibly mi_switch(). > 3. implement a function which, under control of a sysctl call, > activate a new scheduler (by initialising all the function > pointers to appropriate values) and moves all processes from > the old to the new one. In SVR4 different processes could be in different scheduling classes that could cooperate with each other. I think that is a better long-term design goal then requiring switch-overs. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message