Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2009 14:12:30 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        arch@freebsd.org, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: Interrupt Descriptions
Message-ID:  <200910011412.31250.jhb@freebsd.org>
In-Reply-To: <20091002031720.J21519@delplex.bde.org>
References:  <200909301732.20589.jhb@freebsd.org> <200910010953.33838.jhb@freebsd.org> <20091002031720.J21519@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910011412.31250.jhb>