From owner-freebsd-arch Sat Oct 12 14:17: 0 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 D5DDC37B401; Sat, 12 Oct 2002 14:16:58 -0700 (PDT) Received: from carp.icir.org (carp.icir.org [192.150.187.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B5B643EAF; Sat, 12 Oct 2002 14:16:58 -0700 (PDT) (envelope-from rizzo@carp.icir.org) Received: from carp.icir.org (localhost [127.0.0.1]) by carp.icir.org (8.12.3/8.12.3) with ESMTP id g9CLGnpJ091748; Sat, 12 Oct 2002 14:16:49 -0700 (PDT) (envelope-from rizzo@carp.icir.org) Received: (from rizzo@localhost) by carp.icir.org (8.12.3/8.12.3/Submit) id g9CLGnIS091747; Sat, 12 Oct 2002 14:16:49 -0700 (PDT) (envelope-from rizzo) Date: Sat, 12 Oct 2002 14:16:49 -0700 From: Luigi Rizzo To: Jeff Roberson Cc: Julian Elischer , Hiten Pandya , Terry Lambert , Jeff Roberson , arch@FreeBSD.ORG Subject: Re: Scheduler patch, ready for commit. Message-ID: <20021012141649.A91655@carp.icir.org> References: <20021012152434.U30714-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021012152434.U30714-100000@mail.chesapeake.net>; from jroberson@chesapeake.net on Sat, Oct 12, 2002 at 03:27:19PM -0400 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 Sat, Oct 12, 2002 at 03:27:19PM -0400, Jeff Roberson wrote: ... > > If done on the fly, this would require freeing all the allocated procs > > in the uma cache and changing the size of the zone, and re-filling it, > > and replacing all the existing procs with the new larger ones.. hardly a > > likely scenario. > > Pretty obviously the additional storage is in the form of an extra blobb > > hanging off the proc/kse/ksegrp/thread structures as needed. (Unless the > > scheduler can make use of a couple of void * 'p_sched_private' type > > fields we can preallocate. > > > > Is there really demand for on the fly scheduler changes? I guess I always > thought of it as a neat trick and not something useful. It doesnt seem > like it's worth the overhead for the extremely small number of scenarios > where it's needed. if you would actually have a look at how i did it in stable, the codeto support that is just trivial, and the only no overhead in supporting this capability during normal operation is one indirect (as opposed to one direct) function call for each of the scheduler functions, which do not occur very often, and disappear in the noise compared to the rest of the work done by the scheduling code. Besides, the indirect function call is something we are already paying for multiple times on each packet handled by the network stack -- the protocol input routines are handled like this, so is the firewall call, so are the various if_* functions (interrupts, if_start ...), in netgraph, and wherever there is a loadable kernel module. Network events happen in the order of 100,000 times per second on a busy box, whereas scheduling decisions are probably taken 1-2 order of magnitude less frequently. Not that we _need_ to switch schedulers at runtime, but it is terribly conveninent when you are doing testing, and it basically comes for free when you want to make schedulers loadable as KLDs. And since most of the system is going that route i do not see why there are objections to this. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message