From owner-freebsd-current@FreeBSD.ORG Thu Jan 4 22:32:17 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1123516A40F for ; Thu, 4 Jan 2007 22:32:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 9F24513C43E for ; Thu, 4 Jan 2007 22:32:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so7632977nfc for ; Thu, 04 Jan 2007 14:32:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=e7HcCDBVNqQ8t2pk0QNVALv9+71cgBqbK2ncLdGk1mMU/nZ1mij8GBxXrr6WRFU5mlNfUM3ftMIjnJe1gomZTtpnnYNFjy4ak2xMmtmhBAAd9pi4Ok6FtAmslMUJ70dDagxAF/z83y+XybF2qJSa6XteThAU9pw7zX8uHR+Ozdk= Received: by 10.82.182.8 with SMTP id e8mr1662036buf.1167948189736; Thu, 04 Jan 2007 14:03:09 -0800 (PST) Received: by 10.82.189.18 with HTTP; Thu, 4 Jan 2007 14:03:09 -0800 (PST) Message-ID: <3bbf2fe10701041403n79f1b356o3359ab9c627b5e1f@mail.gmail.com> Date: Thu, 4 Jan 2007 23:03:09 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Scott Long" In-Reply-To: <459D1CC8.9060604@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070104005625.D1508@10.0.0.1> <459CCBA1.40305@freebsd.org> <459D1CC8.9060604@samsco.org> X-Google-Sender-Auth: 423af0cb57dd45fd Cc: current@freebsd.org Subject: Re: ULE 2.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2007 22:32:17 -0000 2007/1/4, Scott Long : > David Xu wrote: > > Jeff Roberson wrote: > >> Hello everyone, > >> > >> After a considerable vacation from ULE I have come back to address > >> some long standing concerns. I felt that the old double-queue > >> mechanism caused very unnatural behavior and have finally come up with > >> something I'm happy to replace it with. I've been working on this off > >> and on for several months now. Some details are below. More are at: > >> http://jeffr-tech.livejournal.com/3729.html > >> > >> The version now in CVS(1.172) should restore ULE's earlier interactive > >> performance under load. I have tested with a make -j128 kernel while > >> using mozilla and while playing a dvd. Neither ever skip for me. > >> nice now has a more gradual effect than before. It no longer allows > >> the total starvation of processes. ULE should also be very slightly > >> faster on UP as compared to before. SMP behavior should have changed > >> very little although I did simplify some small parts of these > >> algorithms. In general, non-interactive tasks are scheduled much more > >> intelligently although this may not be apparent under most workloads. > >> > >> I'm hoping for the following types of feedback from anyone interested > >> in testing: > >> > >> 1) Is the response to nice levels as you would hope? I think nice > >> +20 may not inhibit the nice'd thread enough at the moment. > >> 2) Is the interactive performance satisfactory? > >> 3) Is there any performance degredation for your common tasks? > >> 4) Does the cpu estimator give reasonable results? See %cpu in top. > >> It is expected that there will be periods where summing up all threads > >> will yield slightly over 100% cpu. > >> > >> Any and all feedback is welcome. Please make sure any problem reports > >> are sent to jroberson@chesapeake.net in the to line so I see them more > >> quickly. > >> > >> Thanks, > >> Jeff > > > > I think it might be not a right way to work on FreeBSD thread scheduler, > > it is more important to work out a cpu dispatcher rather than inventing > > a dynamic priority algorithm to replace 4BSD's algorithm, the 4BSD > > dynamic priority algorithm is still the best one I can find, it provides > > very good fairness. the most important thing is there should be a > > cpu dispatcher which knows how to place a thread on a cpu with cpu > > affinity-aware, maybe multiple runqueues, it knows cpu topology, and > > may be NUMA awareness, maybe provide cpu partitions, root can create > > and destroy a partition, root can add cpu to the partition or remove > > a cpu from the parition or move a cpu from partition a to partition b, > > bind applications to a partition etcs. On the top of cpu-dispatcher, > > there could be 4BSD or other dynamic priority alogrithm, but that's > > less important than this one. with this thought, I am going to remove > > sched_core as I found the cpu dispatcher is the key thing. > > > > Regards, > > David Xu > > > > It sounds like you want the linux O(1) scheduler. It would be very > interesting to see this applied to FreeBSD. > > Scott Well, sched_core has a lot of the Linux scheduler features. I think what really David want are 2 layers (dispatching/topology) independent by the "scheduling" algorithms. Attilio -- Peace can only be achieved by understanding - A. Einstein