From owner-freebsd-current@FreeBSD.ORG Sat Feb 28 09:02:55 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0DA106567F; Sat, 28 Feb 2009 09:02:55 +0000 (UTC) (envelope-from SNasonov@BCC.RU) Received: from extmx.bcc.ru (extmx.bcc.ru [217.170.85.214]) by mx1.freebsd.org (Postfix) with ESMTP id DF8EF8FC14; Sat, 28 Feb 2009 09:02:54 +0000 (UTC) (envelope-from SNasonov@BCC.RU) Received: from localhost (localhost [127.0.0.1]) by extmx.bcc.ru (Postfix) with ESMTP id 39F7DC43C; Sat, 28 Feb 2009 12:05:41 +0300 (MSK) Received: from extmx.bcc.ru ([127.0.0.1]) by localhost (extmx.bcc.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29090-03; Sat, 28 Feb 2009 12:05:38 +0300 (MSK) Received: from mail.bcc (unknown [192.168.200.208]) by extmx.bcc.ru (Postfix) with ESMTP id B782E976A; Sat, 28 Feb 2009 12:05:38 +0300 (MSK) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Feb 2009 12:02:50 +0300 Message-ID: <597436B54F5FF74FA8EA7F3224FE251F12C69214@mail.bcc> In-Reply-To: <1235778229.1289.60.camel@widget.2hip.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Interrupt stom on cardbus device thread-index: AcmZNUX9JcBMywZhQeCM0JNx5Of7ewATA08g References: <200902271730.07660.snasonov@bcc.ru> <200902271208.48212.jhb@freebsd.org> <1235760629.1289.51.camel@widget.2hip.net> <200902271403.46828.jhb@freebsd.org> <597436B54F5FF74FA8EA7F3224FE251F12C69213@mail.bcc> <1235778229.1289.60.camel@widget.2hip.net> From: "Nasonov Sergey" To: "Robert Noland" X-Virus-Scanned: amavisd-new at bcc.ru Cc: freebsd-current@freebsd.org Subject: RE: Interrupt stom on cardbus device X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 09:02:56 -0000 > -----Original Message----- > From: Robert Noland [mailto:rnoland@FreeBSD.org] > Sent: Saturday, February 28, 2009 2:44 AM > To: Nasonov Sergey > Cc: John Baldwin; freebsd-current@freebsd.org > Subject: RE: Interrupt stom on cardbus device >=20 > On Sat, 2009-02-28 at 00:09 +0300, Nasonov Sergey wrote: > > > -----Original Message----- > > > From: John Baldwin [mailto:jhb@freebsd.org] > > > Sent: Friday, February 27, 2009 10:04 PM > > > To: Robert Noland > > > Cc: freebsd-current@freebsd.org; Nasonov Sergey > > > Subject: Re: Interrupt stom on cardbus device > > > > > > On Friday 27 February 2009 1:50:28 pm Robert Noland wrote: > > > > On Fri, 2009-02-27 at 12:08 -0500, John Baldwin wrote: > > > > > On Friday 27 February 2009 9:30:06 am Sergey G Nasonov wrote: > > > > > > Hello all, > > > > > > I have get an issue after recent kernel recompile. > > > > > > The problem appears after switch from X to text console and back > > to > > > X11. > > > > > > After that vmstat -i show an interrupt storm on cardbus device: > > > > > > > > > > > > > vmstat -i > > > > > > interrupt total rate > > > > > > irq1: atkbd0 6483 3 > > > > > > irq9: acpi0 3236 1 > > > > > > irq12: psm0 347988 167 > > > > > > irq14: ata0 16431 7 > > > > > > irq16: cbb0 uhci2+ 13624982 6556 > > > > > > irq20: uhci0 14 0 > > > > > > irq22: ehci0 2 0 > > > > > > cpu0: timer 4154687 1999 > > > > > > irq256: em0 53736 25 > > > > > > irq257: hdac0 5797 2 > > > > > > cpu1: timer 4153683 1998 > > > > > > irq258: vgapci0 235585 113 > > > > > > Total 22602624 10877 > > > > > > > > > > > > I suppose that the issue related with the latest MSI interrupt > > > > > > handler changes for intel graphics chipset. My laptop has > > i965GM. > > > > > > pciconf -lv: > > > > > > > > > > > > vgapci0@pci0:0:2:0: class=3D0x030000 card=3D0x20b517aa > > > chip=3D0x2a028086 > > > > > > rev=3D0x0c hdr=3D0x00 > > > > > > vendor =3D 'Intel Corporation' > > > > > > device =3D 'Mobile 965 Express Integrated Graphics > > Controller' > > > > > > class =3D display > > > > > > subclass =3D VGA > > > > > > > > > > > > When I added my device to drm_msi_blacklist and recompile drm > > > modules > > > the > > > > > > problem disappear. > > > > > > Is it possible to resolve this problem without moving the device > > to > > > the > > > > > > drm_msi_blacklist? > > > > > > I can test any patches or provide additional detail if it is > > > required. > > > > > > Thanks. > > > > > > > > > > It seems the device is still interrupting on its INTx line perhaps > > in > > > addition > > > > > to the MSI interrupts. > > > > > > > > Hrm, I did most all of that development on a 965gm. When you VT > > switch, > > > > the irq handler gets uninstalled and reinstalled when you return to > > X. > > > > There was an eratta on the 965gm suggesting that msi didn't work > > right, > > > > but I was never able to produce the issue. Intel was having major > > > > issues with this on linux and I finally convinced them to turn msi > > back > > > > on. My irq handler and Eric's are very similar, so I'm not sure > > what > > > > could be going on here. > > > > > > > > There is however an issue with vblanks that might be related. Could > > you > > > > try http://people.freebsd.org/~rnoland/drm-move_vblank_init.patch > > and > > > > see if that helps? > > > > Ok, I tried it but result the same (problem not resolved). > > Can I check anything else? >=20 > Ok, new patch... It is looking like we should actually deal with this in > the pci code, rather than drm, but let's try this patch and see if it > fixes the issue. Note that we are looking for interrupts to still work > (the msi ones anyway) and to not see the INTx ones. >=20 > http://people.freebsd.org/~rnoland/i915_disable_INTx.patch >=20 > robert. Unfortunately, your patch doesn't help. Maybe INTx is still enabled? But I think the problem somewhere herein. I compile DRM modules with DRM_DEBUG, but output is very large and find within it anything useful is hard.=20 >=20 > > Thanks. > > > > > > In this case the issue isn't that MSI isn't working I think, but that > > the > > > hardware is sending interrupts via both routes (MSI and INTx). If > > that > > > happens, then you will see an interrupt storm on the INTx line, but > > > FreeBSD > > > will only notice if another device is sharing the same IRQ line. So > > if > > > your > > > test machine has vgapci0 on irq 22 and you have no other devices on > > IRQ > > > 22, > > > then the storm would go unnoticed. This is most likely a chip bug > > (unless > > > the driver has to explicitly disable INTx interrupts when using MSI). > > It > > > would probably be a good idea to add a hw.drm.msi_enable tunable (or > > > hw.drm.msi) that people can use to disable MSI perhaps. > > > > > > -- > > > John Baldwin > -- > Robert Noland > FreeBSD