NetBSD Problem Report #1033

From gnats  Sun May  7 21:46:11 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id VAA06048 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 7 May 1995 21:46:10 -0700
Message-Id: <199505080446.VAA11730@gandalf.sigmasoft.com>
Date: Sun, 7 May 1995 21:46:55 -0700
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@NetBSD.ORG
Subject: NetBSD/i386 only tallies total IRQs handled on fast interrupts
X-Send-Pr-Version: 3.2

>Number:         1033
>Category:       port-i386
>Synopsis:       NetBSD/i386 only tallies total IRQs handled on fast interrupts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 07 21:50:02 +0000 1995
>Closed-Date:    Sat Jan 24 11:38:08 +0000 1998
>Last-Modified:  Sat Jan 24 11:38:53 +0000 1998
>Originator:     Thorsten Lockert
>Release:        May 7, 1995
>Organization:
SigmaSoft, Th. Lockert
>Environment:
System: NetBSD gandalf.sigmasoft.com 1.0A NetBSD 1.0A (GANDALF) #1: Sat Apr 15 02:02:08 PDT 1995 tholo@gandalf.sigmasoft.com:/usr/src/sys/arch/i386/compile/GANDALF i386


>Description:
	Hardware interrupts are only tallied for fast interrupts, thus
	making the v_intr field of the vmtotal structure almost always
	be 0.

	vmstat still needs to be updated to handle the i386 ports way
	of tallying individual interrupts
>How-To-Repeat:
	"vmstat -s"
>Fix:
	The following patch enables tallying of "slow" interrupts, but
	only if they are not masked.  Should this be done before going
	through the chain of handlers like I do here, before checking
	wether or not the IRQ is masked or when calling each handler?

	I chose to do it when we know we will actually execute code,
	possibly on a restart when changing the mask.

--- src/sys/arch/i386/isa/vector.s.orig	Sun May  7 21:20:53 1995
+++ src/sys/arch/i386/isa/vector.s	Sun May  7 21:34:16 1995
@@ -210,6 +210,7 @@
 	testb	$IRQ_BIT(irq_num),_cpl + IRQ_BYTE(irq_num)		;\
 	jnz	_Xhold/**/irq_num	/* currently masked; hold it */	;\
 _Xresume/**/irq_num/**/:						;\
+	incl	_cnt+V_INTR		/* statistical info */		;\
 	movl	_cpl,%eax		/* cpl to restore on exit */	;\
 	pushl	%eax							;\
 	orl	_intrmask + (irq_num) * 4,%eax				;\
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sat Jan 24 03:38:08 PST 1998 
State-Changed-Why:  
This was fixed a long time ago. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.