From owner-freebsd-current@FreeBSD.ORG Fri Jul 11 03:55:09 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7A2037B401 for ; Fri, 11 Jul 2003 03:55:09 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id E13A243FCB for ; Fri, 11 Jul 2003 03:55:08 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from dialup-67.30.108.143.dial1.sanjose1.level3.net ([67.30.108.143] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19avYM-0006l5-00; Fri, 11 Jul 2003 03:55:04 -0700 Message-ID: <3F0E9667.9C6652AE@mindspring.com> Date: Fri, 11 Jul 2003 03:50:15 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Marcel Moolenaar References: <20030710214339.GA48547@ns1.xcllnt.net> <20030710222839.GA49321@ns1.xcllnt.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a46bf2c131c6444317268c16b5b095cd68a8438e0f32a48e08350badd9bab72f9c350badd9bab72f9c cc: Julian Elischer cc: FreeBSD current users Subject: Re: small scheduler hack/patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 11 Jul 2003 10:55:10 -0000 Marcel Moolenaar wrote: > On Thu, Jul 10, 2003 at 03:03:41PM -0700, Julian Elischer wrote: > > it comes I think from the fact that some hardware treats things as > > bitmaps. (?) > > I have to guess that a bitmap is a natural way to represent sets > when the sets aren't large and that this is why we use bitmaps. > We have a need to send an IPI to multiple CPUs, which is expressed > nicely with bitmaps. Many CISC processors support the necessary instructions for an implementation of the magic "bit-fu" necessary to do things like finding the first bit, counting bits, etc., in O(log2). If you are trying to perform set operations (union, disunion, intersect, least common member, greatest common member, etc.), then bitmaps are a much more natural represntation for this than it would first appear. If you read back over the excerpt I posted from the Intel manual, you'll see that you can send IPIs to *groups* of processors, and this wording was pretty explicitly chosen, rather than saying "broadcast". As one example, you could add a processor to the "idle group", in Julian's latest patch, and then IPI the idle group. This would wake up the processors that were idle, in case the event that resulted in one process going on the run queue was responsible for other processes going on the run queue at the same time. Another example would be adding a processor to the "power managed" group, and actually powering down its private support circuitry to save electricity when, for example you were on a 4 CPU system, and only had a 25% capacity processing load. There's a lot of gold in that mine... -- Terry