Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2010 09:47:49 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        freebsd-arch@freebsd.org
Subject:   "stray irqX" or "irqX: stray"
Message-ID:  <4C21AE15.6030109@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hi.

Now we use different format for stray irq counters names (can be better
seen at `vmstat -ia`). Considering stray is a kind of special case (I
know no other cases using additional counters for interrupt source), I
still think it can be made somewhat more unified. I think we could
change "stray irqX" format to "irqX: stray". This format IMHO better
fits into existing naming scheme of "source: driver".

I propose such a patch:
--- intr_machdep.c.prev 2010-06-17 14:07:35.000000000 +0300

+++ intr_machdep.c      2010-06-23 09:18:52.000000000 +0300

@@ -334,8 +334,8 @@ intrcnt_register(struct intsrc *is)

        mtx_lock_spin(&intrcnt_lock);

        is->is_index = intrcnt_index;

        intrcnt_index += 2;

-       snprintf(straystr, MAXCOMLEN + 1, "stray irq%d",

-           is->is_pic->pic_vector(is));

+       snprintf(straystr, MAXCOMLEN + 1, "%s stray",

+           is->is_event->ie_name);

        intrcnt_updatename(is);

        is->is_count = &intrcnt[is->is_index];

        intrcnt_setname(straystr, is->is_index + 1);


Result looks like:
# vmstat -ia
interrupt                          total       rate

???                                    0          0

irq1: atkbd0                           8          0

irq1: stray                            0          0

irq0: attimer0                         0          0
irq0: stray                            0          0
irq3: uart1                            0          0
irq3: stray                            0          0
....
irq256: re0                          672          2
irq256: stray                          0          0
irq257: ahci0                       1266          4
irq257: stray                          0          0
irq258: hpet0:t0                       0          0
irq258: stray                          0          0
irq259: hpet0:t1                       0          0
irq259: stray                          0          0
...

PS: Sorry for possible bike shed.

-- 
Alexander Motin



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