From owner-freebsd-stable@FreeBSD.ORG Thu Aug 17 00:46:56 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83E1B16A4DE for ; Thu, 17 Aug 2006 00:46:56 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74CD543D45 for ; Thu, 17 Aug 2006 00:46:55 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id c59so527316pyc for ; Wed, 16 Aug 2006 17:46:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=alFFuLwETw2dwcIOG+lWf/NKNWYZE2DVJqyBQ0Rn+asvBjNqNDg8QLcjsEq2bwSzgNBhjKKg2Vhih7UWho8Nbvx2aPe0/wXh7j9f4ytporRZsy9W9TKviNB+gXuTFxYn37wObZO7i59m4eDyB3GLCqcU1+3a6NBa+XfKpg5ZNhs= Received: by 10.35.36.13 with SMTP id o13mr2485593pyj; Wed, 16 Aug 2006 17:46:55 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id c12sm3416337nzc.2006.08.16.17.46.52; Wed, 16 Aug 2006 17:46:54 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7H0mwCM050759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Aug 2006 09:48:58 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7H0mv9e050758; Thu, 17 Aug 2006 09:48:57 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Thu, 17 Aug 2006 09:48:57 +0900 From: Pyun YongHyeon To: Mikhail Teterin Message-ID: <20060817004857.GA49739@cdnetworks.co.kr> References: <200608161618.35199.mi+mx@aldan.algebra.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <200608161618.35199.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.4.2.1i Cc: stable@freebsd.org Subject: Re: Extremely high-load -- due to pcm's IRQ-handling X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 00:46:56 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 16, 2006 at 04:18:34PM -0400, Mikhail Teterin wrote: > kmail prompted me for password, which I supplied. Then, all of a sudden, > the system slowed to a crawl -- even the mouse curse was barely moving. > > It took many minutes to login from the outside and some more to start top. > > Below you can see kmail in kserel keeping the processor(s) EXTREMELY busy. > Note also, the "load" figures. > > According to `systat -vm', exactly 50% of the time is spent in "user", and the > other 50% -- either "sys" or in "irq" -- all of them in the pcm driver. > > [...] > 1.6%Sys 43.7%Intr 49.1%User 0.0%Nice 5.7%Idl 1903516 inact 12: psm > | | | | | | | | | | 122920 cache 15: ata > =++++++++++++++++++++++>>>>>>>>>>>>>>>>>>>>>>>> 15688 free 16: ahc > daefr 86002 17: pcm > [...] > > The computer has two Opterons (single chip 275 with two cores) and is running > a recent 6.1-stable (amd64). > > This happens about once a week. Sometimes a reboot is required, sometimes > killing the stuck process and kldunload-ing the snd_ich is sufficient... > > Kmail is not using the audio in any way and the irq-17 is not shared with any > other device (dmesg attached). When snd_ich is loaded, it says, as expected: > > pcm0: port 0xc800-0xc8ff,0xcc00-0xcc3f irq 17 at device 7.5 on pci0 > pcm0: > > What's going on? Thanks! > > -mi > > last pid: 5150; load averages: 49.23, 52.22, 45.23 up 13+03:13:30 16:01:30 > 158 processes: 2 running, 154 sleeping, 1 stopped, 1 zombie > CPU states: 50.0% user, 0.0% nice, 1.7% system, 22.6% interrupt, 25.8% idle > Mem: 1487M Active, 1859M Inact, 303M Wired, 120M Cache, 214M Buf, 16M Free > Swap: 4465M Total, 52K Used, 4465M Free > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 5893 mi 3 20 0 298M 177M kserel 1 323:18 7634.18% kmail > 90397 root 1 5 0 7400K 1768K ttyin 1 97:01 1.12% systat > 80809 i 1 120 0 238M 224M select 0 160:18 0.68% firefox-bin > 2265 root 1 96 0 261M 144M select 0 49.0H 0.00% Xorg > 2267 root 1 96 0 184M 76428K select 0 149:40 0.00% Xorg > 18203 mi 4 20 0 179M 67696K kserel 0 135:45 0.00% kopete > 2336 i 1 96 0 134M 32132K select 0 71:43 0.00% kdeinit > 87056 i 1 96 0 118M 64392K select 0 52:09 0.00% acroread > [...] Would you give attached patch try? -- Regards, Pyun YongHyeon --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ich.patch" Index: ich.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/pci/ich.c,v retrieving revision 1.67 diff -u -r1.67 ich.c --- ich.c 15 Aug 2006 07:37:41 -0000 1.67 +++ ich.c 17 Aug 2006 00:42:42 -0000 @@ -503,6 +503,11 @@ ICH_LOCK(sc); gs = ich_rd(sc, ICH_REG_GLOB_STA, 4) & ICH_GLOB_STA_IMASK; + if (gs == 0) { + /* Not ours */ + ICH_UNLOCK(sc); + return; + } if (gs & (ICH_GLOB_STA_PRES | ICH_GLOB_STA_SRES)) { /* Clear resume interrupt(s) - nothing doing with them */ ich_wr(sc, ICH_REG_GLOB_STA, gs, 4); --vkogqOf2sHV7VnPd--