From owner-cvs-all@FreeBSD.ORG Wed Nov 2 20:59:53 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B3A516A420; Wed, 2 Nov 2005 20:59:53 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87E6043D55; Wed, 2 Nov 2005 20:59:45 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA2Kxiru071597; Wed, 2 Nov 2005 13:59:44 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <436928C2.8090304@samsco.org> Date: Wed, 02 Nov 2005 13:59:46 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200511022011.jA2KBlHQ005559@repoman.freebsd.org> In-Reply-To: <200511022011.jA2KBlHQ005559@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=3.8 tests=ALL_TRUSTED, SUBJ_HAS_SPACES autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 io_apic.c local_apic.c src/sys/amd64/include apicvar.h intr_machdep.h src/sys/i386/i386 io_apic.c local_apic.c src/sys/i386/include apicvar.h intr_machdep.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 20:59:53 -0000 John Baldwin wrote: > jhb 2005-11-02 20:11:47 UTC > > FreeBSD src repository > > Modified files: > sys/amd64/amd64 io_apic.c local_apic.c > sys/amd64/include apicvar.h intr_machdep.h > sys/i386/i386 io_apic.c local_apic.c > sys/i386/include apicvar.h intr_machdep.h > Log: > Change the x86 code to allocate IDT vectors on-demand when an interrupt > source is first enabled similar to how intr_event's now allocate ithreads > on-demand. Previously, we would map IDT vectors 1:1 to IRQs. Since we > only have 191 available IDT vectors for I/O interrupts, this limited us > to only supporting IRQs 0-190 corresponding to the first 190 I/O APIC > intpins. On many machines, however, each PCI-X bus has its own APIC even > though it only has 1 or 2 devices, thus, we were reserving between 24 and > 32 IRQs just for 1 or 2 devices and thus 24 or 32 IDT vectors. With this > change, a machine with 100 IRQs but only 5 in use will only use up 5 IDT > vectors. Also, this change provides an API (apic_alloc_vector() and > apic_free_vector()) that will allow a future MSI interrupt source driver to > request IDT vectors for use by MSI interrupts on x86 machines. > > Tested on: amd64, i386 > > Revision Changes Path > 1.18 +84 -68 src/sys/amd64/amd64/io_apic.c > 1.19 +100 -22 src/sys/amd64/amd64/local_apic.c > 1.14 +3 -2 src/sys/amd64/include/apicvar.h > 1.7 +29 -3 src/sys/amd64/include/intr_machdep.h > 1.23 +84 -68 src/sys/i386/i386/io_apic.c > 1.20 +101 -23 src/sys/i386/i386/local_apic.c > 1.14 +3 -2 src/sys/i386/include/apicvar.h > 1.9 +29 -3 src/sys/i386/include/intr_machdep.h Excellent, thanks a lot. The other savings here is the dozens of unused ithread stack pages and pcbs. Scott