From owner-freebsd-arch@FreeBSD.ORG Mon Apr 6 20:01:54 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFAD69CB for ; Mon, 6 Apr 2015 20:01:54 +0000 (UTC) Received: from st11p00mm-asmtp003.mac.com (st11p00mm-asmtpout003.mac.com [17.172.81.2]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3299CFE for ; Mon, 6 Apr 2015 20:01:54 +0000 (UTC) Received: from akita.localnet (209-23-203-214-Illinois.hfc.comcastbusiness.net [209.23.203.214]) by st11p00mm-asmtp003.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NME0015ZFIX1E20@st11p00mm-asmtp003.mac.com> for freebsd-arch@freebsd.org; Mon, 06 Apr 2015 19:01:47 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-06_04:2015-04-06,2015-04-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=4 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1504060176 From: Rui Paulo To: freebsd-arch@freebsd.org Subject: Re: x86: finding interrupts that aren't being accounted for? Date: Mon, 06 Apr 2015 12:01:45 -0700 Message-id: <8818748.ffDquhmdWF@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: References: MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 20:01:55 -0000 On Monday 06 April 2015 00:21:29 Adrian Chadd wrote: > Hi, > > I have an .. odd problem on a Lenovo X230. > > I just threw in a very old wifi card (Intel 3945) into the expresscard > (pcie) slot. Now, we don't have any pcie-hp support in -HEAD just yet, > but i wasn't expecting the system to crawl to a halt. > > When I unplug it, everything returns to normal. > > Other cards don't do this. > > So, I figured it may be interrupt spam - but vmstat -ia shows no > interrupts going crazy. > > pmcstat -S CPU_CLK_UNHALTED_CORE -T -w 5 doesn't register anything > either - only a handful of background samples. > > However, /counter/ mode pmc tells a different story - pmcstat -s > CPU_CLK_UNHALTED_CORE -w 1 shows all four cores going at 110% when the > card is inserted, with brief periods of idle. Once I remove the card, > the counters go back down to zero. > > My working theory is: something is chewing CPU and it's likely > interrupts, but if it is, it's something far, far earlier than the x86 > interrupt C code, which counts interrupts and spurious events. > > So - has anyone diagnosed this stuff on FreeBSD/x86 before? I was kind > of hoping we'd at least get accurate statistics about spurious > interrupts, and if we don't, I'd like to understand why. If the cores are being used, you should be getting some samples as to where the PC is. pmcstat doesn't show that? How about DTrace? -- Rui Paulo