Jack Vogel | 1 Oct 01:08 2009
Picon

Re: Interrupt Descriptions

Good job John, will make my test department very happy :)
Once this is in CURRENT I will make changes to the ixgbe driver
to use it also.

Jack

On Wed, Sep 30, 2009 at 2:32 PM, John Baldwin <jhb <at> freebsd.org> wrote:

> A few folks have asked recently for the ability to add descriptive strings
> to
> registered interrupt handlers.  This is especially true since the advent of
> MSI with multiple interrupts per device.  I hacked up a prototype today
> that
> adds a new 'bus_describe_intr()' that takes the IRQ resource, the void *
> cookie returned by bus_setup_intr() and var args description and appends
> that
> to the interrupt name in the thread and vmstat -i info.  The current patch
> only has the MI bits and the MD bits for amd64 as well as a sample change
> to
> the igb(4) driver.
>
> The patch is at http://www.FreeBSD.org/~jhb/patches/intr_describe.patch<http://www.FreeBSD.org/%7Ejhb/patches/intr_describe.patch>
> .
>
> An example from this patch is:
>
> > vmstat -i
> interrupt                          total       rate
> irq1: atkbd0                           8          0
> irq4: uart0                          751          5
(Continue reading)

Bruce Evans | 1 Oct 02:02 2009
Picon

Re: Interrupt Descriptions

On Wed, 30 Sep 2009, John Baldwin wrote:

> A few folks have asked recently for the ability to add descriptive strings to
> registered interrupt handlers.  This is especially true since the advent of
> MSI with multiple interrupts per device.  I hacked up a prototype today that

Interrupt names should be no longer than 4 (5 works sometimes) characters so
that they can be displayed by systat -v.

>...
>> vmstat -i
> interrupt                          total       rate
> irq1: atkbd0                           8          0

The 4-5 characters doesn't include "irqN".  (systat -v already does extra
work to avoid the bad naming scheme visible here.  It moves the "irqN" to
the end, and removes the ":", else truncating these names would give a
larger mess and there would only be space for 3-4 characters of the device
name after wasting 1 for the ":".)

"atkbd0" is already far too long, so systat -v would display "atkbd0 irq"
in the 10 columns available, except it omits "irq" in this case so
as to print the interrupt number, and actually displays "atkbd0 1".

> irq4: uart0                          751          5
> irq6: fdc0                             6          0
> irq14: ata0                           36          0
> irq20: uhci0                          20          0

These are short enough to be displayed by systat -v (after removal of the
(Continue reading)

Poul-Henning Kamp | 1 Oct 08:35 2009
Picon

Re: Interrupt Descriptions

In message <20091001090218.L21015 <at> delplex.bde.org>, Bruce Evans writes:

>Interrupt names should be no longer than 4 (5 works sometimes) characters so
>that they can be displayed by systat -v.

I disagree.  Bytes are cheaper now than they were on a PDP11.  We should
use as many as is necessary to convey sensible information.

--

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk <at> FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Andrew Brampton | 1 Oct 10:54 2009
Picon

Re: Interrupt Descriptions

2009/9/30 John Baldwin <jhb <at> freebsd.org>:
> A few folks have asked recently for the ability to add descriptive strings to
> registered interrupt handlers.  This is especially true since the advent of
> MSI with multiple interrupts per device.  I hacked up a prototype today that
> adds a new 'bus_describe_intr()' that takes the IRQ resource, the void *
> cookie returned by bus_setup_intr() and var args description and appends that
> to the interrupt name in the thread and vmstat -i info.  The current patch
> only has the MI bits and the MD bits for amd64 as well as a sample change to
> the igb(4) driver.
>
> The patch is at http://www.FreeBSD.org/~jhb/patches/intr_describe.patch.
>

Very cool feature, which I had been hoping for on FreeBSD.

Well done.
Andrew
_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Rui Paulo | 1 Oct 11:54 2009
Picon

Re: Interrupt Descriptions

On 1 Oct 2009, at 01:02, Bruce Evans wrote:

> On Wed, 30 Sep 2009, John Baldwin wrote:
>
>> A few folks have asked recently for the ability to add descriptive  
>> strings to
>> registered interrupt handlers.  This is especially true since the  
>> advent of
>> MSI with multiple interrupts per device.  I hacked up a prototype  
>> today that
>
> Interrupt names should be no longer than 4 (5 works sometimes)  
> characters so
> that they can be displayed by systat -v.

We should just change systat, IMHO, but I know it's not easy.

--
Rui Paulo

_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Bruce Evans | 1 Oct 14:58 2009
Picon

Re: Interrupt Descriptions

On Thu, 1 Oct 2009, Poul-Henning Kamp wrote:

> In message <20091001090218.L21015 <at> delplex.bde.org>, Bruce Evans writes:
>
>> Interrupt names should be no longer than 4 (5 works sometimes) characters so
>> that they can be displayed by systat -v.
>
> I disagree.  Bytes are cheaper now than they were on a PDP11.  We should
> use as many as is necessary to convey sensible information.

s/should/shall/ then.  It is the API that interrupt names must be no
longer than 4.  You can disagree with this being the best API but not
with what it is.

Using many bytes here results in no information being conveyed in some
cases, not sensible information, when the long description is truncated
to 3-4 characters to fit in the available space.

Bruce
_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Andriy Gapon | 1 Oct 14:49 2009
Picon

Re: Interrupt Descriptions

on 01/10/2009 00:32 John Baldwin said the following:
> A few folks have asked recently for the ability to add descriptive strings to 
> registered interrupt handlers.  This is especially true since the advent of 
> MSI with multiple interrupts per device.  I hacked up a prototype today that 
> adds a new 'bus_describe_intr()' that takes the IRQ resource, the void * 
> cookie returned by bus_setup_intr() and var args description and appends that 
> to the interrupt name in the thread and vmstat -i info.  The current patch 
> only has the MI bits and the MD bits for amd64 as well as a sample change to 
> the igb(4) driver.
> 
> The patch is at http://www.FreeBSD.org/~jhb/patches/intr_describe.patch.
> 
> An example from this patch is:
> 
>> vmstat -i
> interrupt                          total       rate
> irq1: atkbd0                           8          0
> irq4: uart0                          751          5
> irq6: fdc0                             6          0
> irq14: ata0                           36          0
> irq20: uhci0                          20          0
> irq23: uhci3 ehci0                     2          0
> irq28: mpt0                         1661         11
> irq256: igb0:tx 0                    880          6
> irq257: igb0:rx 0                   1098          7
> irq258: igb0:link                      3          0
> irq259: igb1:tx 0                      1          0
> irq260: igb1:rx 0                    134          0
> irq261: igb1:link                      3          0
> 
(Continue reading)

Bruce Evans | 1 Oct 15:31 2009
Picon

Re: Interrupt Descriptions

On Thu, 1 Oct 2009, Rui Paulo wrote:

> On 1 Oct 2009, at 01:02, Bruce Evans wrote:
>
>> On Wed, 30 Sep 2009, John Baldwin wrote:
>> 
>>> A few folks have asked recently for the ability to add descriptive strings 
>>> to
>>> registered interrupt handlers.  This is especially true since the advent 
>>> of
>>> MSI with multiple interrupts per device.  I hacked up a prototype today 
>>> that
>> 
>> Interrupt names should be no longer than 4 (5 works sometimes) characters 
>> so
>> that they can be displayed by systat -v.

Make that: "Interrupt names must must contain only characters that
take 1 space to print, and must be no longer than 10 characters, or
unique and without garbage when blindly truncated to 10 characters,
or in a special form that can easily be understood and compressed to
<= 10 characters.  The special forms are..."

Similarly for device names (max length 4 or 5) and sleep message strings
(max length 6).

> We should just change systat, IMHO, but I know it's not easy.

It's impossible to make changes that increase display resource requirements
without breaking something.  Either small displays stop working or scrolling
(Continue reading)

Robert Noland | 1 Oct 15:47 2009
Picon

Re: Interrupt Descriptions

On Thu, 2009-10-01 at 23:31 +1000, Bruce Evans wrote:
> On Thu, 1 Oct 2009, Rui Paulo wrote:
> 
> > On 1 Oct 2009, at 01:02, Bruce Evans wrote:
> >
> >> On Wed, 30 Sep 2009, John Baldwin wrote:
> >> 
> >>> A few folks have asked recently for the ability to add descriptive strings 
> >>> to
> >>> registered interrupt handlers.  This is especially true since the advent 
> >>> of
> >>> MSI with multiple interrupts per device.  I hacked up a prototype today 
> >>> that
> >> 
> >> Interrupt names should be no longer than 4 (5 works sometimes) characters 
> >> so
> >> that they can be displayed by systat -v.
> 
> Make that: "Interrupt names must must contain only characters that
> take 1 space to print, and must be no longer than 10 characters, or
> unique and without garbage when blindly truncated to 10 characters,
> or in a special form that can easily be understood and compressed to
> <= 10 characters.  The special forms are..."
> 
> Similarly for device names (max length 4 or 5) and sleep message strings
> (max length 6).
> 
> > We should just change systat, IMHO, but I know it's not easy.
> 
> It's impossible to make changes that increase display resource requirements
(Continue reading)

Robert Noland | 1 Oct 15:12 2009
Picon

Re: Interrupt Descriptions

On Thu, 2009-10-01 at 15:49 +0300, Andriy Gapon wrote:
> on 01/10/2009 00:32 John Baldwin said the following:
> > A few folks have asked recently for the ability to add descriptive strings to 
> > registered interrupt handlers.  This is especially true since the advent of 
> > MSI with multiple interrupts per device.  I hacked up a prototype today that 
> > adds a new 'bus_describe_intr()' that takes the IRQ resource, the void * 
> > cookie returned by bus_setup_intr() and var args description and appends that 
> > to the interrupt name in the thread and vmstat -i info.  The current patch 
> > only has the MI bits and the MD bits for amd64 as well as a sample change to 
> > the igb(4) driver.
> > 
> > The patch is at http://www.FreeBSD.org/~jhb/patches/intr_describe.patch.
> > 
> > An example from this patch is:
> > 
> >> vmstat -i
> > interrupt                          total       rate
> > irq1: atkbd0                           8          0
> > irq4: uart0                          751          5
> > irq6: fdc0                             6          0
> > irq14: ata0                           36          0
> > irq20: uhci0                          20          0
> > irq23: uhci3 ehci0                     2          0
> > irq28: mpt0                         1661         11
> > irq256: igb0:tx 0                    880          6
> > irq257: igb0:rx 0                   1098          7
> > irq258: igb0:link                      3          0
> > irq259: igb1:tx 0                      1          0
> > irq260: igb1:rx 0                    134          0
> > irq261: igb1:link                      3          0
(Continue reading)


Gmane