From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 18:27:10 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F3811065693 for ; Thu, 1 Oct 2009 18:27:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE788FC1D for ; Thu, 1 Oct 2009 18:27:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BAE5346B17; Thu, 1 Oct 2009 14:27:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id EF10A8A01F; Thu, 1 Oct 2009 14:27:08 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Thu, 1 Oct 2009 14:12:30 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <200910010953.33838.jhb@freebsd.org> <20091002031720.J21519@delplex.bde.org> In-Reply-To: <20091002031720.J21519@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910011412.31250.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Oct 2009 14:27:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org, Andriy Gapon Subject: Re: Interrupt Descriptions X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 18:27:10 -0000 On Thursday 01 October 2009 1:54:15 pm Bruce Evans wrote: > On Thu, 1 Oct 2009, John Baldwin wrote: > > > For the ithread name we are stuck with MAXCOMLEN. I would like to overhaul > > the intrcnt stuff to possibly allow for longer names and be mostly MI (having > > all the longs shared across cache lines that might be shared by multiple CPUs > > isn't ideal either at this point). I am considering having either an array or > > list of intrcnt structures with a name and a count with a sysctl that exports > > an array for vmstat to use (the kvm bits could always rebuild the list using > > the same logic as the sysctl handler for crash dumps). The current design is > > very limiting and forces the weird space padding to make renaming intrcnt > > descriptions manageable when adding/removing interrupt handlers. > > The design has few limits. My old implementation had no limits on > name lengths. It just had a limit on the combined length, due to it > allocating the string space statically. String spaces without padding > require about 10 extra lines to create and zero extra lines to use > (since the users already expect a string space so they already have > the extra lines to walk over it). Changing the descriptions, including > rebuilding the whole string space whenever an interrupt handler is > added/removed/renamed shouldn't be a problem since this is a rare > event. Just lock out the sysctl and other accesses to the string space > while changing/reallocating the string space. Counters are harder -- > you can't move them without locking out interrupt handlers that > increment them. I consider having to rebuild the entire namespace when changing one name a design limitation. I think it worked fine when you had machines without hotplug hardware (or drivers) where the set of interrupts in use was essentially built once during boot and static thereafter. However, that is no longer the machines we have. -- John Baldwin