From owner-freebsd-arm@freebsd.org Fri Apr 21 09:21:34 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0360D3BE4D for ; Fri, 21 Apr 2017 09:21:34 +0000 (UTC) (envelope-from tvijlbrief@gmail.com) Received: from mail-yw0-x236.google.com (mail-yw0-x236.google.com [IPv6:2607:f8b0:4002:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5FCCC6 for ; Fri, 21 Apr 2017 09:21:34 +0000 (UTC) (envelope-from tvijlbrief@gmail.com) Received: by mail-yw0-x236.google.com with SMTP id k11so4027770ywb.1 for ; Fri, 21 Apr 2017 02:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u8FaWFDOoHxOlBJoLT2aCkIBlO3jCCZ2BvCVtZ05sgM=; b=oPMcbAvAkp4dLjhdPJ34CMgWnsXbuj9fy7ndYgD+kfCczGtJSy/nNbZgsHYZG1cIrT byMt4YP+VGRvjrBs75UWiWlQW6KyH2zCJNO1UZ9V/4ywCyqVRnz8tvrfO/yPqbnhSGwt FumIy/DHM4Jl6S7/g6O3Yj4qV/o90Vszfu64cSBJSshHUh8A6rXJDPSlChfcFITd1Dzt Nh4dFk4q7VYmVfj3E5pDp9vqx61zlN6izY2eGRjXXAk0xEaNMQRfOCIlY7KTwdv5lRw9 0LhLaTgiKDHrJWGVpEeMuqYsSpDe4/BaFMfdaLSiSW0aKrCEPX+hubFe/w+rxPduovjU 6rNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u8FaWFDOoHxOlBJoLT2aCkIBlO3jCCZ2BvCVtZ05sgM=; b=ujKdYxbUXhoAE9v/By4i21HMVr6A2NlpEpN9d2ZEtazW0STDX8lcOdx1jwZkTk0i03 e9saC0QR5fVj+QW4vPVDdBrYdECONIFbf3hBb2qq8BiGA7qHnpWXN8kEwJWMVsUnnu6b LPrlPfUMUA6TD6fg/PF1p44tFpk86lHBnX+lE6Pd0OqvdS1BOSO2/zuKhi46ImRZzWXx NEYlFHdLRY3Xr2R/Jyrb7bDm86FweZU5kRRcCNKP3XzM+1vzOQ054OyWIQwIxhaLfONH +xZmvLtO1XSqM8gjkL6hkZtu6OwevSi22jK475FJhHCzgONwqRW9v4ZcJPK/kClN4yb6 g92w== X-Gm-Message-State: AN3rC/4yfVWdQj+niP0241Avvox2E6W13O5CuyP21bI7tki+6SGVzJiV /nH/KZNg7bHvojlhDIrOMjmZ10WTv5fF X-Received: by 10.13.236.199 with SMTP id v190mr10239565ywe.65.1492766493744; Fri, 21 Apr 2017 02:21:33 -0700 (PDT) MIME-Version: 1.0 References: <28157698-A5E9-4194-9B5D-77D7B487ADFB@dsl-only.net> In-Reply-To: <28157698-A5E9-4194-9B5D-77D7B487ADFB@dsl-only.net> From: Tom Vijlbrief Date: Fri, 21 Apr 2017 09:21:23 +0000 Message-ID: Subject: Re: Pine64 spurious interrupts To: Mark Millard Cc: freebsd-arm Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 09:21:35 -0000 Hi Mark, Thanks for your feedback! On boot I often find a single spurious interrupt 92 generated on my 1GB Pine64+: root@pine64:~ # dmesg | grep pur gic0: Spurious interrupt detected: last irq: 92 on CPU0 I used to get a lot of 1023's but the current kernel gives me: ic0: Spurious interrupt detected: last irq: 92 on CPU0 root@pine64:~ # gic0: Spurious interrupt detected: last irq: 106 on CPU3 gic0: Spurious interrupt detected: last irq: 27 on CPU0 gic0: Spurious interrupt detected: last irq: 27 on CPU3 gic0: Spurious interrupt detected: last irq: 27 on CPU2 gic0: Spurious interrupt detected: last irq: 27 on CPU2 gic0: Spurious interrupt detected: last irq: 27 on CPU3 gic0: gic0: Spurious interrupt detected: last irq: 27 on CPU2 Spurious interrupt detected: last irq: 27 on CPU1 gic0: Spurious interrupt detected: last irq: 106 on CPU3 gic0: Spurious interrupt detected: last irq: 27 on CPU2 gic0: Spurious interrupt detected: last irq: 27 on CPU1 I want to upgrade my RPI first model (256Mb :-) which is my low power server to this Pine64 board, but this spurious interrupt issue holds me back. Op vr 21 apr. 2017 om 10:57 schreef Mark Millard : > [I had done the spurious-interrupt code change long enough ago > that having not had any notices of non-1023 for the current > irq that I'd forgotten which board I'd had the problem > with. It was the Pine64+ 2GB. So correcting my earlier > notes. . .] > > On 2017-Apr-21, at 1:07 AM, Tom Vijlbrief wrote: > > > I have a lot of spurious interrupts on my Pine64. > > I've seen this as well. I sent out notes on the > lists back on 2016-Nov-07 and 2017-Jan-28/31. It > is a Pine64+ 2GB. I later got access to a rpi3 > as well but I run the same world and kernel build > on it and so do not know if it would generate the > messages. I'll have to try that at some point. > > I'd seen a couple of the notices on armv7 (a bpim3) > before I'd made any changes to what I build. But > very rare. (I'd swapped the status in my head when > I wrote before.) > > > Even in idle single user mode: > > > > # pstree > > -+= 00001 root /sbin/init -- > > \-+= 01783 root -sh (sh) > > \-+= 01804 root pstree > > \--- 01805 root ps -axwwo user,pid,ppid,pgid,command > > # > > > > gic0: Spurious interrupt detected: last irq: 27 on CPU3 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 27 on CPU2 > > gic0: Spurious interrupt detected: last irq: 114 on CPU1 > > gic0: Spurious interrupt detected: last irq: 27 on CPU3 > > gic0: Spurious interrupt detected: last irq: 27 on CPU3 > > gic0: Spurious interrupt detected: last irq: 114 on CPU1 > > gic0: Spurious interrupt detected: last irq: 27 on CPU2 > > gic0: Spurious interrupt detected: last irq: 27 on CPU2 > > gic0: Spurious interrupt detected: last irq: 27 on CPU2 > > gic0: gic0: Spurious interrupt detected: last irq: 27 on CPU3 > > Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 114 on CPU1 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > gic0: Spurious interrupt detected: last irq: 27 on CPU0 > > > > When building world (3 threads) the frequency is about a few each > second, idle perhaps a few each hour. > > I got thousands in sort order during buildworld buildkernel > (-j4). Idle was normally rare for one to be generated but > it did happen on occasion. > > If I re-enable the notices I should try -j3 vs. -j4 > and see how much of a difference it makes. > > The 1023 IRQ can be delivered because another core > has handled the original IRQ as I remember what I > quoted in the prior message. So keeping all cores > busy might generate more of these notices. > > > I have ethernet connected and a small USB hard disk with it's own power > supply, which hosts /usr/{src,obj,ports}. > > Similarly here (but an SSD on a powered hub), with the > whole root file system on the SSD. Only booting through > the kernel stage comes from /dev/mmcsd0 . > > > In addition I noticed an ethernet lock up from time to time. Executing > "dmesg" in a ssh session is often sufficient to trigger it. > > I used to get this but I've not seen it since the > recent fixes to fork behavior. May be it would happen > again if I re-enabled the gic0 messages for current > irq 1023, another potential experiment. > > One of the fixes to fork was avoiding interrupts > corrupting a special register. > > > The weird thing is that after some boots (perhaps 1 out of 10) the > spurious interrupts do not happen! I have not been able to detect a pattern > here. > > I also had occasions when it would not happen after booting, > or at least for a significant time after booting, even if > I did a buildworld buildkernel. I did have examples where > it eventually started getting the messages again. > > > Can others reproduce these findings? > > I have in the past but I currently have things set up > to generate messages only when the current irq is not > 1023 --which generates no such messages to speak of. > > > Thanks in advance for any hints. > > I only got as far as learning that the current IRQ > was (nearly?) always 1023. I really did not learn > any more. (I went after investigating fork issues > once I could use the console reasonably.) > > I've not figured out how to get any more useful > information so far. > > But the code change that I sent should get rid of the > notices. That in turn makes the console far more useful. > Other than that it just masks the problem, whatever the > problem is. > > === > Mark Millard > markmi at dsl-only.net > > > >