From owner-freebsd-arch@FreeBSD.ORG Wed Jun 23 06:48:30 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7931065672 for ; Wed, 23 Jun 2010 06:48:30 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id AFCC78FC19 for ; Wed, 23 Jun 2010 06:48:29 +0000 (UTC) Received: by fxm7 with SMTP id 7so3325023fxm.13 for ; Tue, 22 Jun 2010 23:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=2XXq93gXUnU/AyMQgqH4Q+Xf48PrGTAiygB1XsVXGNo=; b=Ahef1oftJEGbB+hrIouhrzHNvfpLy5ENfML6uwrcwTVMoD8N03Bnn+eWYTt+EpStCX trNz7K0LEZpWqEV+E6h2ELsJ2MRCsicROd6LG3LiET9x+phU6QJYJYrwLgYjVdrXf6Zk hG/iu1/2x3DufvvNVITNYbfxHqEAbGr6QvY+c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ZgiwBkfAfyL2xu/hvgn6Xwd3CehAWGKYQftCw16p8jvHNZE8HPwHu24XZX/vl6wNGW A70uK+WZvksa4CWC8Wo2WfBQoTPXNN1kTR8S3XKC4m/Ig+a3QPBmurkfWKxjxORkeUqb UKmf1Feqw1j7vLxd6m1wwszL7qCW9Cjqur6w0= Received: by 10.223.101.4 with SMTP id a4mr7120503fao.71.1277275708540; Tue, 22 Jun 2010 23:48:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id o19sm31830337fal.47.2010.06.22.23.48.27 (version=SSLv3 cipher=RC4-MD5); Tue, 22 Jun 2010 23:48:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C21AE15.6030109@FreeBSD.org> Date: Wed, 23 Jun 2010 09:47:49 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-arch@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: "stray irqX" or "irqX: stray" 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: Wed, 23 Jun 2010 06:48:30 -0000 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