From owner-freebsd-mips@FreeBSD.ORG Mon Apr 26 19:36:49 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5239D106564A; Mon, 26 Apr 2010 19:36:49 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8A18FC16; Mon, 26 Apr 2010 19:36:48 +0000 (UTC) Received: by pwi9 with SMTP id 9so8915687pwi.13 for ; Mon, 26 Apr 2010 12:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iI5Cqwea8p1A4VEkhfOT3emn9wdM9BTXOJr5M0Q4SSE=; b=H07SZqj+L8qA+iXweNqCJDhPUhujOhSuzTtgabLmzClYfrHxMqg+bMH21GU3WdMl12 slw5l8x3Y6j2FgxglDq5h/BaMjuR4dx3/ObTIpFLj7E+SussXzqtaMzSVKjmvFdWHbYv YVL/oDXkY0Gv3FbNEWQ8FvlYjTZNMtpNuDrKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DrNcbcybm7SJ4dYW4Ue9lXQqSKP4/JpSJWZaSo7UL1PrsXXjeqWWntKDCw+RmcXGKi A46cfVPsBOHYa98E5i7aKgTSkH6nSU/BJIY9XKPd3iXIFdn9tv3u0faUjhvRUhwGtMSv Xlc9/1soLCgVbeS2KErSXavLYrdgvYW33GaGE= MIME-Version: 1.0 Received: by 10.141.188.27 with SMTP id q27mr4485324rvp.73.1272310603303; Mon, 26 Apr 2010 12:36:43 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Mon, 26 Apr 2010 12:36:43 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 01:06:43 +0530 Message-ID: From: "C. Jayachandran" To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Crashes with the current -HEAD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 19:36:49 -0000 On Fri, Apr 23, 2010 at 11:55 PM, Juli Mallett wrote= : > JC, > > It's probably my fault if that's when your last good kernel was. =A0Do > you mind trying updating to r206713 then r206714 then r206717 then > r206819 and r206834? =A0Or start with r206717 and go earlier or later > based on whether it works. =A0If you can figure out what commit was at > fault, I'll be glad to work with you to isolate whatever's > responsible. =A0In the meantime, I'll try to reproduce and fix this > locally. I checked a few versions, r206714 does not have the crash, r206717 has. I haven't looked at the changes yet, but if you have any suggestions let me know. > On Fri, Apr 23, 2010 at 06:38, C. Jayachandran = wrote: >> I'm seeing crashes like the one below when I do a 'make -j16 >> buildworld' in the current HEAD. =A0This is without SMP enabled and >> without any of the XLR smp changes. >> >> buildworld used to work on XLR with earlier kernels - the last good >> kernel I have is around r206712. =A0Any idea what can be causing this? >> >> Thanks, >> JC. >> >> xlrboard# =A0 =A0Mar 18 14:04:43 xlrboard kernel: BAD_PAGE_FAULT: pid >> 12596 (cc), uid 1001: pc 0 got a read fault at 0 >> Mar 18 14:04:43 xlrboard kernel: Trapframe Register Dump: >> Mar 18 14:04:43 xlrboard kernel: zero: 0 =A0 =A0 =A0 =A0at: 0x1000a1f4 = =A0v0: >> 0x7fffcf28 =A0v1: 0 >> Mar 18 14:04:43 xlrboard kernel: a0: 0x7fffd638 a1: 0x470bf8 =A0 =A0a2: >> 0x7fffcf28 =A0a3: 0x470c24 >> Mar 18 14:04:43 xlrboard kernel: t0: 0 =A0t1: 0x4000000 =A0 t2: 0 =A0 t3= : 0 >> Mar 18 14:04:43 xlrboard kernel: t4: 0 =A0t5: 0 =A0 t6: 0 =A0 t7: 0 >> Mar 18 14:04:43 xlrboard kernel: t8: 0 =A0t9: 0 =A0 s0: 0x7fffd638 =A0s1= : 0 >> Mar 18 14:04:43 xlrboard kernel: s2: 0x1b =A0 =A0 =A0 s3: 0 =A0 s4: 0 = =A0 s5: >> 0x7fffcf31 >> Mar 18 14:04:43 xlrboard kernel: s6: 0x471398 =A0 s7: 0x3 k0: 0 =A0 k1: = 0 >> Mar 18 14:04:43 xlrboard kernel: gp: 0x1000f630 sp: 0x7fffcec8 =A0s8: >> 0x7fffcf31 =A0ra: 0x43a200 >> Mar 18 14:04:43 xlrboard kernel: sr: 0xc013 =A0 =A0 mullo: 0 =A0 =A0 =A0= =A0mulhi: >> 0 =A0 =A0 =A0 =A0badvaddr: 0 >> Mar 18 14:04:43 xlrboard kernel: cause: 0x8 =A0 =A0 pc: 0 >> Mar 18 14:04:43 xlrboard kernel: pc address 0 is inaccessible, pde =3D >> 0x0, pte =3D 0x0 >> Mar 18 14:04:43 xlrboard kernel: BAD_PAGE_FAULT: pid 12601 (as), uid >> 1001: pc 0x524818 got a read fault at 0x4b90 >> JC. From owner-freebsd-mips@FreeBSD.ORG Mon Apr 26 19:39:38 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10BF1106564A; Mon, 26 Apr 2010 19:39:38 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id CB2058FC17; Mon, 26 Apr 2010 19:39:37 +0000 (UTC) Received: by pvc21 with SMTP id 21so464849pvc.13 for ; Mon, 26 Apr 2010 12:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ox35G2GJdQ/WNuSgOkMaH3x2+KcLS+VsVWp/tgONnF8=; b=C0mD4917TNY90S5Xfn7ZC2UicPFeio5VY5EemsiSch1Gf2ceLW6SdfMt7nVz3LZdL3 64eKWKJi8/rjOTK2VfNwNY5SNlQPfS0WackYKpaLtu0PeaJonWbplJVUTRtj0JX/wu/U 4FpFiSoGIrA3WM6zAFXzO2Vf5qqBXxmluod9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d7RmMPGKphBxRrKtHgmJyuMqwN4Cr7dwKFvYcbje8E/Aifk7AMqwGdy+FSq3p2QXGb YhQteFGPyYCTXVN8rzToZNtwDNZGexhmsIJaqM9DAKbJmudidzdMkrNDX18NN+yul5EH Y31T87GRdVZKYE1o8rHfNcYE7mgFXp4KVtH34= MIME-Version: 1.0 Received: by 10.141.2.4 with SMTP id e4mr4375805rvi.60.1272310774875; Mon, 26 Apr 2010 12:39:34 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Mon, 26 Apr 2010 12:39:34 -0700 (PDT) In-Reply-To: <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> References: <6BDB3874-D779-45A6-ABAE-4C331D78A189@lakerest.net> <7BEFA3F5-97AE-477C-9DD3-EF1C4B7DCEB0@freebsd.org> <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> Date: Tue, 27 Apr 2010 01:09:34 +0530 Message-ID: From: "C. Jayachandran" To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 19:39:38 -0000 On Tue, Apr 20, 2010 at 4:42 PM, Rui Paulo wrote: > On 20 Apr 2010, at 12:06, C. Jayachandran wrote: >> I'm not seeing the issue here(my output for ref below). =A0The rge patch >> should not really make a difference - but it will be good to try with >> that. =A0The only other difference I can think of between our configs is >> MFS root/NFS root and rge0/rge1 - but none of these should affect the >> message ring threads. =A0Can you send me the config you use? > ... > I use the basic XLR config with some mods: > +options =A0 =A0 =A0 =A0PREEMPTION =A0 =A0 =A0 =A0 =A0 =A0 =A0# Enable ke= rnel thread preemption ... As Randall said, this may be the issue, I haven't had much time to look at this, since I'm still looking at another issue. Do you still have the issue without PREEMPTION? Thanks, JC. From owner-freebsd-mips@FreeBSD.ORG Mon Apr 26 19:49:33 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D250106566C for ; Mon, 26 Apr 2010 19:49:33 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 13E608FC14 for ; Mon, 26 Apr 2010 19:49:32 +0000 (UTC) Received: by gyh20 with SMTP id 20so6484486gyh.13 for ; Mon, 26 Apr 2010 12:49:27 -0700 (PDT) Received: by 10.100.24.17 with SMTP id 17mr97928anx.53.1272311367531; Mon, 26 Apr 2010 12:49:27 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.100.131.16 with HTTP; Mon, 26 Apr 2010 12:49:07 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Mon, 26 Apr 2010 12:49:07 -0700 X-Google-Sender-Auth: 7f88278d8eef5fa2 Message-ID: To: "C. Jayachandran" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Crashes with the current -HEAD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 19:49:33 -0000 On Mon, Apr 26, 2010 at 12:36, C. Jayachandran w= rote: > I checked a few versions, =A0r206714 does not have the crash, r206717 > has. I haven't looked at the changes yet, but if you have any > suggestions let me know. There are two things there that could be problematic. The first is that interrupt enable/disable has been changed. I don't know anything about hazards on RMI systems, but if there's an interrupt disable hazard, you may want to change CLEAR_STATUS and DO_AST macros (in exception.S and asm.h respectively) to use many more nops or ehbs and see if that makes the problem go away. The second is the changes to the lmem pages. If you reduce MAXMEM so that all of your memory is addressable within KSEG0 and KSEG1, you won't use lmem at all. If that makes the problem go away, it suggests there is trouble in that area. I'm glad to do whatever I can, but I've been unable to get any RMI hardware, so all I can do is suggest you look at those two areas your try to narrow down to the specific change that caused the problem. Thanks, Juli. From owner-freebsd-mips@FreeBSD.ORG Mon Apr 26 20:19:58 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31BE81065678; Mon, 26 Apr 2010 20:19:58 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mx1.freebsd.org (Postfix) with ESMTP id F095E8FC12; Mon, 26 Apr 2010 20:19:57 +0000 (UTC) Received: by pzk39 with SMTP id 39so968994pzk.7 for ; Mon, 26 Apr 2010 13:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eEw2NpSCuOfgsuE1bU1dXCmzol1dx8A5gBJGfsQjzXI=; b=GsW/ORRS1LoMhZg1m3vHjbUQT0claouyuoNGpqDLOfb751u/JpteBBBVJM6wdxhJDu lPiQtBxVcqI/dlMd6nC8fVKXFQlGn07QabeHgCY9/8/hyxj5RDmP5kWQhrSQvtPqjy6B tIL1UosizEabDijIHJaaILEUrKBW0esrFf3YI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iTDzvNq2zJNhbj2b247sKl1YFbJdV4APLHHLXT4K/s2orHwkeNAqOMcYzlOsSYtBwk gSsTuth0gVPl4lpVE77t4OmLePE7Rm8GnSTrcTLLLnluT/In27Qp5EeLyrZ1Vu94itVw 0uTe4rbQHHWcd+/hi5k28m3KayqovHKWSF9rY= MIME-Version: 1.0 Received: by 10.141.213.24 with SMTP id p24mr4237278rvq.291.1272313195286; Mon, 26 Apr 2010 13:19:55 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Mon, 26 Apr 2010 13:19:55 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 01:49:55 +0530 Message-ID: From: "C. Jayachandran" To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Crashes with the current -HEAD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 20:19:58 -0000 On Tue, Apr 27, 2010 at 1:19 AM, Juli Mallett wrote: > On Mon, Apr 26, 2010 at 12:36, C. Jayachandran = wrote: >> I checked a few versions, =A0r206714 does not have the crash, r206717 >> has. I haven't looked at the changes yet, but if you have any >> suggestions let me know. > > There are two things there that could be problematic. > > The first is that interrupt enable/disable has been changed. =A0I don't > know anything about hazards on RMI systems, but if there's an > interrupt disable hazard, you may want to change CLEAR_STATUS and > DO_AST macros (in exception.S and asm.h respectively) to use many more > nops or ehbs and see if that makes the problem go away. XLR does not need any hazards for this. > The second is the changes to the lmem pages. =A0If you reduce MAXMEM so > that all of your memory is addressable within KSEG0 and KSEG1, you > won't use lmem at all. =A0If that makes the problem go away, it suggests > there is trouble in that area. > > I'm glad to do whatever I can, but I've been unable to get any RMI > hardware, so all I can do is suggest you look at those two areas your > try to narrow down to the specific change that caused the problem. >From the crash it looks like the PTE/PDE entires of some user processes are getting corrupted. May be this is due to the LMEM changes - will look at the code.... Regards, JC. From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 11:28:36 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC991065673 for ; Wed, 28 Apr 2010 11:28:36 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4688FC1A for ; Wed, 28 Apr 2010 11:28:36 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 47BD318F38A for ; Wed, 28 Apr 2010 06:28:35 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id 22JVH3UBDVPI for ; Wed, 28 Apr 2010 06:28:35 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) From: Rui Paulo In-Reply-To: Date: Wed, 28 Apr 2010 12:28:33 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> References: To: freebsd-mips@freebsd.org X-Mailer: Apple Mail (2.1078) Subject: Re: [PATCH] Account RMI XLR interrupts X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 11:28:36 -0000 On 20 Apr 2010, at 12:36, Rui Paulo wrote: > Hi, > The following patch accounts interrupts on the XLR and makes vmstat -i = and systat work display useful data. I think the commented out atomic = inc can go away, but I'm not sure. >=20 > Here's an example: >=20 > $ vmstat -i > interrupt total rate > int16: 56118 984 > int17: 214 3 > Total 56332 988 >=20 > int16 is the timer and int17 is the network interface (rge1). >=20 > Index: intr_machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- intr_machdep.c (revision 206791) > +++ intr_machdep.c (working copy) > @@ -157,28 +157,17 @@ > for (i =3D sizeof(eirr) * 8 - 1; i >=3D 0; i--) { > if ((eirr & (1ULL << i)) =3D=3D 0) > continue; > ie =3D mips_intr_events[i]; > /* atomic_add_long(mih->cntp, 1); */ > + /* Don't account special IRQs */ > + switch (i) { > + case IRQ_IPI: > + case IRQ_MSGRING: > + break; > + default: > + mips_intrcnt_inc(mips_intr_counters[i]); > + } >=20 > write_c0_eirr64(1ULL << i); > pic_ack(i, 0); >=20 Can I commit this? Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 11:45:20 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35E451065670 for ; Wed, 28 Apr 2010 11:45:20 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id E4E368FC1F for ; Wed, 28 Apr 2010 11:45:19 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id F3A6C11BA1A; Wed, 28 Apr 2010 06:45:18 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id 702AO2380XJM; Wed, 28 Apr 2010 06:45:18 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: Date: Wed, 28 Apr 2010 12:45:16 +0100 Content-Transfer-Encoding: 7bit Message-Id: <8DA4B46E-7923-4C01-9345-75C7A598C023@freebsd.org> References: <6BDB3874-D779-45A6-ABAE-4C331D78A189@lakerest.net> <7BEFA3F5-97AE-477C-9DD3-EF1C4B7DCEB0@freebsd.org> <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> To: C. Jayachandran X-Mailer: Apple Mail (2.1078) Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 11:45:20 -0000 On 26 Apr 2010, at 20:39, C. Jayachandran wrote: > On Tue, Apr 20, 2010 at 4:42 PM, Rui Paulo wrote: >> On 20 Apr 2010, at 12:06, C. Jayachandran wrote: >>> I'm not seeing the issue here(my output for ref below). The rge patch >>> should not really make a difference - but it will be good to try with >>> that. The only other difference I can think of between our configs is >>> MFS root/NFS root and rge0/rge1 - but none of these should affect the >>> message ring threads. Can you send me the config you use? >> > ... >> I use the basic XLR config with some mods: >> +options PREEMPTION # Enable kernel thread preemption > ... > > As Randall said, this may be the issue, I haven't had much time to > look at this, since I'm still looking at another issue. Do you still > have the issue without PREEMPTION? Just tested on the most recent HEAD and yes I still have the issue :-( Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 11:57:24 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D55F1065672; Wed, 28 Apr 2010 11:57:24 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 1946D8FC1F; Wed, 28 Apr 2010 11:57:23 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o3SBvJ57019264 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 28 Apr 2010 07:57:20 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1272455840; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=DOPQpivT+rjk2CbVHZetjdC8qnBpNPvQmhIX0r9amdN3EZqu8OtmRqI 2QS9YPAjG23/nkZ7ce86GIoh7SO6COQ== Message-Id: <921B6E11-9919-4674-B7A2-71EB3A22B2EB@lakerest.net> From: Randall Stewart To: Rui Paulo In-Reply-To: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 28 Apr 2010 04:57:19 -0700 References: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: [PATCH] Account RMI XLR interrupts X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 11:57:24 -0000 Rui: Let me commit the whole works when I get back to CA.. That won't be until a week from Sunday... unless your desperate to get this in.. I was hoping to get to the bottom of the other SMP crash I see before dumping all of JC's patches in.. But if you need this badly enough go ahead... R On Apr 28, 2010, at 4:28 AM, Rui Paulo wrote: > > On 20 Apr 2010, at 12:36, Rui Paulo wrote: > >> Hi, >> The following patch accounts interrupts on the XLR and makes vmstat >> -i and systat work display useful data. I think the commented out >> atomic inc can go away, but I'm not sure. >> >> Here's an example: >> >> $ vmstat -i >> interrupt total rate >> int16: 56118 984 >> int17: 214 3 >> Total 56332 988 >> >> int16 is the timer and int17 is the network interface (rge1). >> >> Index: intr_machdep.c >> =================================================================== >> --- intr_machdep.c (revision 206791) >> +++ intr_machdep.c (working copy) >> @@ -157,28 +157,17 @@ >> for (i = sizeof(eirr) * 8 - 1; i >= 0; i--) { >> if ((eirr & (1ULL << i)) == 0) >> continue; >> ie = mips_intr_events[i]; >> /* atomic_add_long(mih->cntp, 1); */ >> + /* Don't account special IRQs */ >> + switch (i) { >> + case IRQ_IPI: >> + case IRQ_MSGRING: >> + break; >> + default: >> + mips_intrcnt_inc(mips_intr_counters[i]); >> + } >> >> write_c0_eirr64(1ULL << i); >> pic_ack(i, 0); >> > > Can I commit this? > > Regards, > -- > Rui Paulo > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 11:58:27 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30EB61065695; Wed, 28 Apr 2010 11:58:27 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id A77F18FC15; Wed, 28 Apr 2010 11:58:26 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o3SBwPBZ019311 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 28 Apr 2010 07:58:25 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1272455906; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=YaE4F9UCh/+jyFWnKAl07j4pFPU/u7Bfmj24YTQuzGulUKjDdw8Cn1Y pVKHYvqR6GTw1aADV9WPFo2mKn0Pqvg== Message-Id: From: Randall Stewart To: Rui Paulo In-Reply-To: <8DA4B46E-7923-4C01-9345-75C7A598C023@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 28 Apr 2010 04:58:25 -0700 References: <6BDB3874-D779-45A6-ABAE-4C331D78A189@lakerest.net> <7BEFA3F5-97AE-477C-9DD3-EF1C4B7DCEB0@freebsd.org> <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> <8DA4B46E-7923-4C01-9345-75C7A598C023@freebsd.org> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 11:58:27 -0000 Yeah, There are still lots of issues with the SMP patches... Have you tested without PREEMPTION? Note that I still get a crash without it.. but its centered in an IPI with a spin-lock held to long during a buildworld -j16 R On Apr 28, 2010, at 4:45 AM, Rui Paulo wrote: > On 26 Apr 2010, at 20:39, C. Jayachandran wrote: > >> On Tue, Apr 20, 2010 at 4:42 PM, Rui Paulo >> wrote: >>> On 20 Apr 2010, at 12:06, C. Jayachandran wrote: >>>> I'm not seeing the issue here(my output for ref below). The rge >>>> patch >>>> should not really make a difference - but it will be good to try >>>> with >>>> that. The only other difference I can think of between our >>>> configs is >>>> MFS root/NFS root and rge0/rge1 - but none of these should affect >>>> the >>>> message ring threads. Can you send me the config you use? >>> >> ... >>> I use the basic XLR config with some mods: >>> +options PREEMPTION # Enable kernel thread >>> preemption >> ... >> >> As Randall said, this may be the issue, I haven't had much time to >> look at this, since I'm still looking at another issue. Do you still >> have the issue without PREEMPTION? > > Just tested on the most recent HEAD and yes I still have the issue :-( > > Regards, > -- > Rui Paulo > > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 12:07:22 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915561065672 for ; Wed, 28 Apr 2010 12:07:22 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4A41B8FC21 for ; Wed, 28 Apr 2010 12:07:21 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id A8FC811BA4F; Wed, 28 Apr 2010 07:07:20 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id 9EFXX9M3RUIM; Wed, 28 Apr 2010 07:07:20 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: Date: Wed, 28 Apr 2010 13:07:18 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <6BDB3874-D779-45A6-ABAE-4C331D78A189@lakerest.net> <7BEFA3F5-97AE-477C-9DD3-EF1C4B7DCEB0@freebsd.org> <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> <8DA4B46E-7923-4C01-9345-75C7A598C023@freebsd.org> To: Randall Stewart X-Mailer: Apple Mail (2.1078) Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 12:07:22 -0000 On 28 Apr 2010, at 12:58, Randall Stewart wrote: > Yeah, > > There are still lots of issues with the SMP patches... > > Have you tested without PREEMPTION? Yes, that's the test I was talking about. Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 12:07:53 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B30F1065676 for ; Wed, 28 Apr 2010 12:07:53 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4D88F8FC19 for ; Wed, 28 Apr 2010 12:07:53 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 89CD511BA4F; Wed, 28 Apr 2010 07:07:52 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id RSKFE8EN5T0Z; Wed, 28 Apr 2010 07:07:52 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <921B6E11-9919-4674-B7A2-71EB3A22B2EB@lakerest.net> Date: Wed, 28 Apr 2010 13:07:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9CFB162F-42D6-4A53-BDA2-452A19D30495@freebsd.org> References: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> <921B6E11-9919-4674-B7A2-71EB3A22B2EB@lakerest.net> To: Randall Stewart X-Mailer: Apple Mail (2.1078) Cc: freebsd-mips@freebsd.org Subject: Re: [PATCH] Account RMI XLR interrupts X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 12:07:53 -0000 On 28 Apr 2010, at 12:57, Randall Stewart wrote: > Rui: >=20 > Let me commit the whole works when I get back to CA.. >=20 > That won't be until a week from Sunday... unless your > desperate to get this in.. Sure, I'll wait. I was just wondering if there's the patch was correct = or not. Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 12:41:44 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A84E11065672; Wed, 28 Apr 2010 12:41:44 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 51DBD8FC1C; Wed, 28 Apr 2010 12:41:44 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o3SCfgKV021403 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 28 Apr 2010 08:41:43 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1272458503; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=WdfUvf8SoBCvixgYDRYZQpKPSEcLMKoJg9J7ZpLkzfl3v4mX+HPOkVm bedla4whMKO0QWggmPUUrQEflcUrMFw== Message-Id: <1D5AF6FF-0561-40A5-8DA8-7AB988B58844@lakerest.net> From: Randall Stewart To: Rui Paulo In-Reply-To: <9CFB162F-42D6-4A53-BDA2-452A19D30495@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 28 Apr 2010 05:41:42 -0700 References: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> <921B6E11-9919-4674-B7A2-71EB3A22B2EB@lakerest.net> <9CFB162F-42D6-4A53-BDA2-452A19D30495@freebsd.org> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: [PATCH] Account RMI XLR interrupts X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 12:41:44 -0000 Rui: I am fine with it.. it looks correct to me... I have just been hoping to dump in all this at once.. once all the crashes have been resolved... sigh... I just wish I could manufacture more time ;-) R On Apr 28, 2010, at 5:07 AM, Rui Paulo wrote: > > On 28 Apr 2010, at 12:57, Randall Stewart wrote: > >> Rui: >> >> Let me commit the whole works when I get back to CA.. >> >> That won't be until a week from Sunday... unless your >> desperate to get this in.. > > Sure, I'll wait. I was just wondering if there's the patch was > correct or not. > > Regards, > -- > Rui Paulo > > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 18:44:43 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A9B3106564A; Wed, 28 Apr 2010 18:44:43 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 119308FC15; Wed, 28 Apr 2010 18:44:42 +0000 (UTC) Received: by pxi17 with SMTP id 17so2912726pxi.13 for ; Wed, 28 Apr 2010 11:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=+8vDRnFj5HxtlRspzLMk6juNSy9G3lT1gSqr3iOEm5M=; b=TjP+hCdZuKVofHz4fi9enhfOLFz7I6YpFi77Fegy+ZviD4ZurE91rHjTUlohlMs+WJ 68I37d4QF7yiMtQblUu2gmrShGlgX6pD3AXEs3fKYk6Q7hMlx17NAtSnZbFxo3cWWigS IiPAE99e/ChkFoCMPa9wu742rEqBvDy0ZEo58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=FBvd0oYmYBUwcJo/HFWSxeV3uHUSvePjdAzk6HUCYxCOwIDX9V/2pdBHUX4IUyz3d2 oqd12tdtaACg5vzZRXehxsiId18vFUfAvjFgdG48dpYuv5qw7kV549L1DUQNS7lvg/o7 D9qj4EouXhaTJ994wKnk4mERWE8UlNBYkRM6U= MIME-Version: 1.0 Received: by 10.140.247.20 with SMTP id u20mr5915146rvh.122.1272480277411; Wed, 28 Apr 2010 11:44:37 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Wed, 28 Apr 2010 11:44:37 -0700 (PDT) In-Reply-To: References: <7BEFA3F5-97AE-477C-9DD3-EF1C4B7DCEB0@freebsd.org> <3820374E-010D-40EA-A596-4AF1694B4119@freebsd.org> <8DA4B46E-7923-4C01-9345-75C7A598C023@freebsd.org> Date: Thu, 29 Apr 2010 00:14:37 +0530 Message-ID: From: "C. Jayachandran" To: Randall Stewart Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: SMP support for XLR processors. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 18:44:43 -0000 On Wed, Apr 28, 2010 at 5:28 PM, Randall Stewart wrote: > Yeah, > > There are still lots of issues with the SMP patches... > > Have you tested without PREEMPTION? > > Note that I still get a crash without it.. but its > centered in an IPI with a spin-lock held to long during > a buildworld -j16 Did you try the smp-rdv.patch I'd sent earlier, that should have fixed the hang (unless we are seeing different issues). JC. From owner-freebsd-mips@FreeBSD.ORG Fri Apr 30 11:04:37 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7BC81065672; Fri, 30 Apr 2010 11:04:37 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mx1.freebsd.org (Postfix) with ESMTP id 75AFA8FC18; Fri, 30 Apr 2010 11:04:37 +0000 (UTC) Received: by pzk39 with SMTP id 39so39609pzk.7 for ; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=Fz93eR0U4hKIHr6gMcdan7RoNoxJGNrRkCmGjnDWJic=; b=mdmS3/8FOTyGjXopS5n7QLan51pi94X/uVcubJR3VkT190Qqr4eAGFX62TdBi8mYL9 M5j8CRPf4Ur8AM4Ot1TY0PryS9wlafo/dxcrDPLye1MBXXDSZH0BMnooICOkD/abp2ap DoYLOyq1jF6aBYjiF2mWlegUNma5x8uiklyl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=Evsj1AIRn9lVQdoG6Nq27za37NdsFWoyzA0dt4mXp9JzuY8Ax05DDjgO6nUFPt9qeo pwpC47Rll8tFpe2sv8/SFaj+9on43YtAuUVPXpJdY1Cj9OCstQJ4JXZo99LtoqKvl1iw c9Fa7U05R3Eu7+4K5jG5iSC61eqFCtZB54ok4= MIME-Version: 1.0 Received: by 10.140.58.2 with SMTP id g2mr682711rva.172.1272625465473; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Fri, 30 Apr 2010 04:04:25 -0700 (PDT) Date: Fri, 30 Apr 2010 16:34:25 +0530 Message-ID: From: "C. Jayachandran" To: freebsd-mips@freebsd.org, Randall Stewart Content-Type: multipart/mixed; boundary=001636b2ac73cd39ad0485723460 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Alternate scheme for page table page allocation X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 11:04:37 -0000 --001636b2ac73cd39ad0485723460 Content-Type: text/plain; charset=ISO-8859-1 I was looking at a hang I get during 'make -j32 buildworld' on XLR SMP, and as far as I can see, it is caused by the way page table pages are allocated when we have >512MB memory. The attached patch (http://sites.google.com/site/cjayachandran/files//pmap-page-alloc.patch) changes the way pages for the PTE/PDE entries are allocated in systems with >512M. This scheme uses vm_phys_alloc_contig to allocate page table pages KSEG0 region and has a UMA zone to cache them. This will allow us to avoid multi-TLB misses that happen when we access page table entires in the TLB miss handler. I think a similar approach can be taken to allocate 8K page-pairs for N32(for >4GB RAM) and N64. With this patch, 'make -j32 buildworld' consistently works with 32 cpus on an XLR is booted SMP with 4GB RAM. With the current page alloc code, I get a hang about an hour into buildworld. The patch is based off r206712 - I still have not found a fix for the crashes I see in versions after that. Please let me know your comments, especially if you can think of a better way of doing this. I can make a version of this patch for HEAD if this is acceptable. JC. --001636b2ac73cd39ad0485723460-- From owner-freebsd-mips@FreeBSD.ORG Fri Apr 30 16:45:35 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71946106568C; Fri, 30 Apr 2010 16:45:35 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id 9A2858FC12; Fri, 30 Apr 2010 16:45:34 +0000 (UTC) Received: by ewy24 with SMTP id 24so118403ewy.33 for ; Fri, 30 Apr 2010 09:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=ZMWmPrRzROEcEBlYKnMgG6MY8sgUd4cC3I1u04MLm7c=; b=vlb9rUfCB9O1OE3b47aGw7Y2JY4HkHxwr1O737pUncWUqllUKyk6PqSkinsOM/f/LS 4pVDL7VAGrg3tIx6S/AIZ6Cl9LbXCiYLFRi2wNhoY0NKLRSRDqauo6Huis0ODn/8l6Lc y51d4z7IqgWuUoTYw5YyWAPqS6UdVdOfdEieY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=RWzoAVZnzmKl9Ms+ziuE7D6URRTyoiyStfN27AQeo5RXXatVmw4UqP+GWZsSFQYR6R EWe1yXT89v4Ipns3ILMt0EhG/t0cLDzkO0Zgb/iRBgv8/RnBD27oYbc8Vp+IeYeOw2OR 2wZoaRpot50kp3MLFF/685aTNdvyElQcG8Vds= Received: by 10.213.52.208 with SMTP id j16mr4250548ebg.39.1272645928784; Fri, 30 Apr 2010 09:45:28 -0700 (PDT) Received: from jayachandranc@netlogicmicro.com ([203.92.57.132]) by mx.google.com with ESMTPS id 13sm1322465ewy.13.2010.04.30.09.44.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Apr 2010 09:44:48 -0700 (PDT) Date: Fri, 30 Apr 2010 22:18:52 +0530 From: "Jayachandran C." To: Juli Mallett Message-ID: <4bdb0900.0d67f10a.0ae4.7784@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-mips@freebsd.org Subject: Fix for pmap.c X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 16:45:35 -0000 There seems to be a obvious bug in the current pmap.c, can you please review/apply the patch below. This seems to be the cause of the crashes I'm seeing in HEAD. I'm still testing with the patch, the buildworld I use will have to run a few more hours to be completely sure that this is the problem. JC. Index: sys/mips/mips/pmap.c =================================================================== --- sys/mips/mips/pmap.c (revision 207433) +++ sys/mips/mips/pmap.c (working copy) @@ -236,7 +236,7 @@ sched_pin(); \ va1 = sysm->base; \ va2 = sysm->base + PAGE_SIZE; \ - npte = mips_paddr_to_tlbpfn(phys2) | \ + npte = mips_paddr_to_tlbpfn(phys1) | \ PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; \ pte = pmap_pte(kernel_pmap, va1); \ *pte = npte; \ From owner-freebsd-mips@FreeBSD.ORG Fri Apr 30 17:34:48 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 677AA106566C for ; Fri, 30 Apr 2010 17:34:48 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (lakerest.net [70.155.160.98]) by mx1.freebsd.org (Postfix) with ESMTP id 94FFC8FC18 for ; Fri, 30 Apr 2010 17:34:47 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o3UHD73p048055 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 30 Apr 2010 13:13:07 -0400 (EDT) (envelope-from rrs@lakerest.net) Message-Id: <3FC8C451-8FE2-4761-8A64-28761E07FEF2@lakerest.net> From: Randall Stewart To: "Jayachandran C." In-Reply-To: <4bdb0900.0d67f10a.0ae4.7784@mx.google.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 30 Apr 2010 10:13:07 -0700 References: <4bdb0900.0d67f10a.0ae4.7784@mx.google.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: Fix for pmap.c X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 17:34:48 -0000 JC: Thats definitely a bug and would only effect those that have >512Meg of memory. I have committed for you in rev 207441 R On Apr 30, 2010, at 9:48 AM, Jayachandran C. wrote: > There seems to be a obvious bug in the current pmap.c, can you please > review/apply the patch below. > > This seems to be the cause of the crashes I'm seeing in HEAD. I'm > still > testing with the patch, the buildworld I use will have to run a few > more > hours to be completely sure that this is the problem. > > JC. > > > Index: sys/mips/mips/pmap.c > =================================================================== > --- sys/mips/mips/pmap.c (revision 207433) > +++ sys/mips/mips/pmap.c (working copy) > @@ -236,7 +236,7 @@ > sched_pin(); \ > va1 = sysm->base; \ > va2 = sysm->base + PAGE_SIZE; \ > - npte = mips_paddr_to_tlbpfn(phys2) | \ > + npte = mips_paddr_to_tlbpfn(phys1) | \ > PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; \ > pte = pmap_pte(kernel_pmap, va1); \ > *pte = npte; \ > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Fri Apr 30 23:16:57 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9018106564A; Fri, 30 Apr 2010 23:16:57 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id B3DCD8FC15; Fri, 30 Apr 2010 23:16:56 +0000 (UTC) Received: by pwi9 with SMTP id 9so459324pwi.13 for ; Fri, 30 Apr 2010 16:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=8GlTCmkrqeyx1Z9yhzl+GiTX7qHOIOnw9++snpS7sWY=; b=fsdVNzRBG6+WUN6cuQBwbw+WVmKuXFem8F3F1rHnKMQaDffKf0E07GKBYHtHOuXqWf CY5YaFE1tY6d5d3zHA7qLHN0cMe0TpqSCIy3cHqA98WB1Su5w7Yv9aCS0NHm7fMJtdRx /g3lZ7wP1O2SpDlrSq/lGUoMVa9RYmSD2satM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ilRN7rVZidUaafnyXqNojyLG4156ZBimElbdrqj5QHFTuoWljlVCTTHBEwkTSC1DUy x0MwI73P1z13OpVF4/5NqLRt609mxK9cHLu5n5z6OjEPfPVukqkoUYOnKLT+JkqVJblm yuaJ5HUro3jsgF0Gr2eLhnj6N+o9IGLqRK65Y= MIME-Version: 1.0 Received: by 10.140.58.2 with SMTP id g2mr1427316rva.172.1272669410446; Fri, 30 Apr 2010 16:16:50 -0700 (PDT) Received: by 10.140.194.17 with HTTP; Fri, 30 Apr 2010 16:16:50 -0700 (PDT) In-Reply-To: References: Date: Sat, 1 May 2010 04:46:50 +0530 Message-ID: From: "C. Jayachandran" To: freebsd-mips@freebsd.org, Randall Stewart Content-Type: multipart/mixed; boundary=001636b2ac73204f5704857c70c3 Cc: Subject: Re: Alternate scheme for page table page allocation X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 23:16:58 -0000 --001636b2ac73204f5704857c70c3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here's a version which will apply on HEAD (also at http://sites.google.com/site/cjayachandran/files). Regards, JC. On Fri, Apr 30, 2010 at 4:34 PM, C. Jayachandran wrote: > I was looking at a hang I get during 'make -j32 buildworld' on XLR > SMP, and as far as I can see, it is caused by the way page table pages > are allocated when we have >512MB memory. > > The attached patch > (http://sites.google.com/site/cjayachandran/files//pmap-page-alloc.patch) > changes the way pages for the PTE/PDE entries are allocated in systems > with >512M. This scheme uses vm_phys_alloc_contig to allocate page > table pages KSEG0 region and =A0has a UMA zone to cache them. This will > allow us to avoid multi-TLB misses that happen when we access page > table entires in the TLB miss handler. I think a similar approach can > be taken to allocate 8K page-pairs for N32(for >4GB RAM) and N64. > > With this patch, 'make -j32 buildworld' consistently works with 32 > cpus =A0on an XLR is booted SMP with 4GB RAM. =A0With the current page > alloc code, I get a hang about an hour into buildworld. > > The patch is based off r206712 - I still have not found a fix for the > crashes I see in versions after that. Please let me know your > comments, =A0especially if you can think of a better way of doing this. > I can make a version of this patch for HEAD if this is acceptable. > > JC. --001636b2ac73204f5704857c70c3 Content-Type: application/octet-stream; name="pmap-page-alloc-HEAD.patch" Content-Disposition: attachment; filename="pmap-page-alloc-HEAD.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g8nmgnva1 SW5kZXg6IHN5cy9taXBzL21pcHMvcG1hcC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9taXBzL21pcHMv cG1hcC5jCShyZXZpc2lvbiAyMDc0NTEpCisrKyBzeXMvbWlwcy9taXBzL3BtYXAuYwkod29ya2lu ZyBjb3B5KQpAQCAtODAsNiArODAsNyBAQAogCiAjaW5jbHVkZSA8dm0vdm0uaD4KICNpbmNsdWRl IDx2bS92bV9wYXJhbS5oPgorI2luY2x1ZGUgPHZtL3ZtX3BoeXMuaD4KICNpbmNsdWRlIDxzeXMv bG9jay5oPgogI2luY2x1ZGUgPHN5cy9tdXRleC5oPgogI2luY2x1ZGUgPHZtL3ZtX2tlcm4uaD4K QEAgLTEwOSw2ICsxMTAsMTAgQEAKICNkZWZpbmUJUE1BUF9TSFBHUEVSUFJPQyAyMDAKICNlbmRp ZgogCisjaWYgZGVmaW5lZChUQVJHRVRfWExSX1hMUykKKyNkZWZpbmUgSElHSE1FTV9TVVBQT1JU CisjZW5kaWYKKwogI2lmICFkZWZpbmVkKFBNQVBfRElBR05PU1RJQykKICNkZWZpbmUJUE1BUF9J TkxJTkUgX19pbmxpbmUKICNlbHNlCkBAIC0xODMsMTIgKzE4OCwxOCBAQAogc3RhdGljIGludCBp bml0X3B0ZV9wcm90KHZtX29mZnNldF90IHZhLCB2bV9wYWdlX3QgbSwgdm1fcHJvdF90IHByb3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lbF92bV9lbmQpID0gKHBkX2VudHJ5X3QpcHRlOwogCiAJ CS8qCkBAIC0xMzk2LDcgKzE0NDgsOCBAQAogCQl9CiAJfQogCi0JS0FTU0VSVChwdiAhPSBOVUxM LCAoInBtYXBfcmVtb3ZlX2VudHJ5OiBwdiBub3QgZm91bmQiKSk7CisJS0FTU0VSVChwdiAhPSBO VUxMLCAoInBtYXBfcmVtb3ZlX2VudHJ5OiBwdiBub3QgZm91bmQsIHBhICVseCB2YSAlbHgiLAor CSAgICAgKHVfbG9uZylWTV9QQUdFX1RPX1BIWVMobSksICh1X2xvbmcpdmEpKTsKIAlUQUlMUV9S RU1PVkUoJm0tPm1kLnB2X2xpc3QsIHB2LCBwdl9saXN0KTsKIAltLT5tZC5wdl9saXN0X2NvdW50 LS07CiAJaWYgKFRBSUxRX0ZJUlNUKCZtLT5tZC5wdl9saXN0KSA9PSBOVUxMKQo= --001636b2ac73204f5704857c70c3-- From owner-freebsd-mips@FreeBSD.ORG Sat May 1 08:59:16 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71DCC1065672 for ; Sat, 1 May 2010 08:59:16 +0000 (UTC) (envelope-from fk@bsdler.de) Received: from hell.bsdler.de (www.nonstopviolence.de [213.95.21.223]) by mx1.freebsd.org (Postfix) with ESMTP id EFDC18FC14 for ; Sat, 1 May 2010 08:59:15 +0000 (UTC) Received: from hell.nonstopviolence.de (localhost [127.0.0.1]) by hell.bsdler.de (Postfix) with ESMTP id 29902B83E for ; Sat, 1 May 2010 10:41:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsdler.de Received: from hell.bsdler.de ([127.0.0.1]) by hell.nonstopviolence.de (hell.bsdler.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ovD1tvyUMDKW for ; Sat, 1 May 2010 10:41:05 +0200 (CEST) Received: from pinky.terror.local (p5DD1C97F.dip.t-dialin.net [93.209.201.127]) by hell.bsdler.de (Postfix) with ESMTPSA id 263BFB83A for ; Sat, 1 May 2010 10:41:05 +0200 (CEST) Received: from [172.17.21.80] (brain.terror.local [172.17.21.80]) by pinky.terror.local (Postfix) with ESMTP id 247BA26D01C for ; Sat, 1 May 2010 08:41:04 +0000 (UTC) From: Florian Kruegl To: freebsd-mips@freebsd.org Content-Type: text/plain; charset="ASCII" Date: Sat, 01 May 2010 10:38:39 +0200 Message-ID: <1272703119.48777.19.camel@brain.lan.terror.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fk@bsdler.de List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 08:59:16 -0000 Hi, I get a trap when setting up wlan interface on RS pro. Hardware is TP-Link TL-WN861N (AR9223) ----------------< dmesg >---------------- ath0: irq 1 at device 18.0 on pci0 ath0: [ITHREAD] ath0: AR9280 mac 128.2 RF5133 phy 13.0 ----------------< dmesg >---------------- ----------------< with create >---------------- xerxes# ifconfig wlan0 create wlandev ath0 wlan0: Ethernet address: 94:0c:6d:bc:4b:61 xerxes# ifconfig ath0: flags=8802 metric 0 mtu 2290 ether 94:0c:6d:bc:4b:61 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) status: no carrier [...] wlan0: flags=8802 metric 0 mtu 1500 ether 94:0c:6d:bc:4b:61 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) status: no carrier ssid "" channel 1 (2412 MHz 11b) regdomain 32924 country CN indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1 wme burst bintval 0 xerxes# ifconfig wlan0 up Trap cause = 7 (bus error (load or store) - kernel mode) [ thread pid 0 tid 100032 ] Stopped at platform_start+0x1b10: srl v0,a1,8 db> bt Tracing pid 0 tid 100032 td 0xc0c834c0 db_trace_thread+30 (?,?,?,?) ra 800a78b0 sp c79f77b0 sz 24 800a7794+11c (0,?,ffffffff,?) ra 800a72a4 sp c79f77c8 sz 32 800a6f10+394 (?,?,?,?) ra 800a7434 sp c79f77e8 sz 168 db_command_loop+78 (?,?,?,?) ra 800a9b08 sp c79f7890 sz 24 800a9a00+108 (?,?,?,?) ra 80210f08 sp c79f78a8 sz 424 kdb_trap+108 (?,?,?,?) ra 80486490 sp c79f7a50 sz 32 trap+1620 (?,?,?,?) ra 8047cbc0 sp c79f7a70 sz 176 MipsKernGenException+134 (0,deadc0de,a258,c79f7c74) ra 8049bdc8 sp c79f7b20 sz 200 8049bdc0+8 (?,?,?,?) ra 0 sp c79f7be8 sz 0 pid 0 ----------------< with create >---------------- similar trap without creating a wlan interface ----------------< without create >---------------- xerxes# ifconfig ath0 up Trap cause = 7 (bus error (load or store) - kernel mode) [ thread pid 1808 tid 100068 ] Stopped at platform_start+0x1b10: srl v0,a1,8 db> bt Tracing pid 1808 tid 100068 td 0xc0d46980 db_trace_thread+30 (?,?,?,?) ra 800a78b0 sp c7efd670 sz 24 800a7794+11c (0,?,ffffffff,?) ra 800a72a4 sp c7efd688 sz 32 800a6f10+394 (?,?,?,?) ra 800a7434 sp c7efd6a8 sz 168 db_command_loop+78 (?,?,?,?) ra 800a9b08 sp c7efd750 sz 24 800a9a00+108 (?,?,?,?) ra 80210f08 sp c7efd768 sz 424 kdb_trap+108 (?,?,?,?) ra 80486490 sp c7efd910 sz 32 trap+1620 (?,?,?,?) ra 8047cbc0 sp c7efd930 sz 176 MipsKernGenException+134 (0,deadc0de,a258,c7efdb34) ra 8049bdc8 sp c7efd9e0 sz 200 8049bdc0+8 (?,?,?,?) ra 0 sp c7efdaa8 sz 0 pid 1808 ----------------< without create >---------------- ----------------< svn info >---------------- Path: . URL: svn://svn.freebsd.org/base/head Repository Root: svn://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 207449 Node Kind: directory Schedule: normal Last Changed Author: jilles Last Changed Rev: 207449 Last Changed Date: 2010-04-30 21:52:35 +0200 (Fri, 30 Apr 2010) ----------------< svn info >---------------- flo From owner-freebsd-mips@FreeBSD.ORG Sat May 1 10:09:38 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C70B1065672 for ; Sat, 1 May 2010 10:09:38 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 51AA38FC1B for ; Sat, 1 May 2010 10:09:38 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id C66F811BA7E; Sat, 1 May 2010 05:09:36 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id 3FAQFEQ9AA1B; Sat, 01 May 2010 05:09:36 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <1272703119.48777.19.camel@brain.lan.terror.local> Date: Sat, 1 May 2010 11:09:33 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> References: <1272703119.48777.19.camel@brain.lan.terror.local> To: fk@bsdler.de X-Mailer: Apple Mail (2.1078) Cc: freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 10:09:38 -0000 On 1 May 2010, at 09:38, Florian Kruegl wrote: > Hi, >=20 > I get a trap when setting up wlan interface on RS pro.=20 Maybe this is because some structure is misaligned. Can you enable = AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that = ath_debug=3D0xffffffff and ath_hal_debug=3D0xffffffff ? Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Sat May 1 16:00:25 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0859C106566B for ; Sat, 1 May 2010 16:00:25 +0000 (UTC) (envelope-from fk@bsdler.de) Received: from hell.bsdler.de (www.nonstopviolence.de [213.95.21.223]) by mx1.freebsd.org (Postfix) with ESMTP id A89F78FC15 for ; Sat, 1 May 2010 16:00:24 +0000 (UTC) Received: from hell.nonstopviolence.de (localhost [127.0.0.1]) by hell.bsdler.de (Postfix) with ESMTP id ED868B83E; Sat, 1 May 2010 18:00:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsdler.de Received: from hell.bsdler.de ([127.0.0.1]) by hell.nonstopviolence.de (hell.bsdler.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ozGn0Do+qqaD; Sat, 1 May 2010 18:00:22 +0200 (CEST) Received: from pinky.terror.local (p5DD1CDF8.dip.t-dialin.net [93.209.205.248]) by hell.bsdler.de (Postfix) with ESMTPSA id E5836B83A; Sat, 1 May 2010 18:00:21 +0200 (CEST) Received: from [172.17.21.80] (brain.terror.local [172.17.21.80]) by pinky.terror.local (Postfix) with ESMTP id 180C726D01C; Sat, 1 May 2010 16:00:21 +0000 (UTC) From: Florian Kruegl To: Rui Paulo In-Reply-To: <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> References: <1272703119.48777.19.camel@brain.lan.terror.local> <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> Content-Type: text/plain; charset="ASCII" Date: Sat, 01 May 2010 17:57:56 +0200 Message-ID: <1272729476.48777.25.camel@brain.lan.terror.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fk@bsdler.de List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:00:25 -0000 Hi On Sat, 2010-05-01 at 11:09 +0100, Rui Paulo wrote: > On 1 May 2010, at 09:38, Florian Kruegl wrote: > > > Hi, > > > > I get a trap when setting up wlan interface on RS pro. > > Maybe this is because some structure is misaligned. Can you enable AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that ath_debug=0xffffffff and ath_hal_debug=0xffffffff ? > --------------< bootup >-------------- ath0: irq 1 at device 18.0 on pci0 ath0: [ITHREAD] ath_getchannels: eeprom rd 32924 cc 156 (mapped rd 32924 cc 156) location I ecm ath_descdma_setup: rx DMA: 40 buffers 1 desc/buf ath_descdma_setup: rx DMA map: 0xa0923000 (3840) -> 0x923000 (3840) ath_descdma_setup: tx DMA: 200 buffers 10 desc/buf ath_descdma_setup: tx DMA map: 0xa0980000 (192000) -> 0x980000 (192000) ath_descdma_setup: beacon DMA: 4 buffers 1 desc/buf ath_descdma_setup: beacon DMA map: 0xa0970000 (384) -> 0x970000 (384) ath0: AR9280 mac 128.2 RF5133 phy 13.0 --------------< bootup >-------------- --------------< setup >-------------- xerxes# ifconfig ath0 up ath_init: if_flags 0x8803 ath_stop_locked: invalid 0 if_flags 0x8803 Trap cause = 7 (bus error (load or store) - kernel mode) [ thread pid 1809 tid 100067 ] Stopped at platform_start+0x1b10: srl v0,a1,8 --------------< setup >-------------- Regards Flo From owner-freebsd-mips@FreeBSD.ORG Sat May 1 16:13:31 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98E87106566B; Sat, 1 May 2010 16:13:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0508C8FC14; Sat, 1 May 2010 16:13:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o41GDMwo036708; Sat, 1 May 2010 10:13:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 01 May 2010 10:13:35 -0600 (MDT) Message-Id: <20100501.101335.4959786895405294.imp@bsdimp.com> To: rpaulo@freebsd.org From: "M. Warner Losh" In-Reply-To: <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> References: <1272703119.48777.19.camel@brain.lan.terror.local> <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: fk@bsdler.de, freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:13:31 -0000 In message: <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> Rui Paulo writes: : : On 1 May 2010, at 09:38, Florian Kruegl wrote: : : > Hi, : > : > I get a trap when setting up wlan interface on RS pro. : : Maybe this is because some structure is misaligned. Can you enable AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that ath_debug=0xffffffff and ath_hal_debug=0xffffffff ? Let's try first things first. Are you running with the right patch to ath to work around the bug in the hardware? Warner From owner-freebsd-mips@FreeBSD.ORG Sat May 1 16:24:18 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FBE1106564A; Sat, 1 May 2010 16:24:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B7CCC8FC12; Sat, 1 May 2010 16:24:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o41GJ0kQ036758; Sat, 1 May 2010 10:19:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 01 May 2010 10:19:14 -0600 (MDT) Message-Id: <20100501.101914.634347869592892486.imp@bsdimp.com> To: fk@bsdler.de From: "M. Warner Losh" In-Reply-To: <1272729476.48777.25.camel@brain.lan.terror.local> References: <1272703119.48777.19.camel@brain.lan.terror.local> <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> <1272729476.48777.25.camel@brain.lan.terror.local> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:24:18 -0000 In message: <1272729476.48777.25.camel@brain.lan.terror.local> Florian Kruegl writes: : Hi : : On Sat, 2010-05-01 at 11:09 +0100, Rui Paulo wrote: : > On 1 May 2010, at 09:38, Florian Kruegl wrote: : > : > > Hi, : > > : > > I get a trap when setting up wlan interface on RS pro. : > : > Maybe this is because some structure is misaligned. Can you enable AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that ath_debug=0xffffffff and ath_hal_debug=0xffffffff ? : > : : --------------< bootup >-------------- : ath0: irq 1 at device 18.0 on pci0 : ath0: [ITHREAD] : ath_getchannels: eeprom rd 32924 cc 156 (mapped rd 32924 cc 156) : location I ecm : ath_descdma_setup: rx DMA: 40 buffers 1 desc/buf : ath_descdma_setup: rx DMA map: 0xa0923000 (3840) -> 0x923000 (3840) : ath_descdma_setup: tx DMA: 200 buffers 10 desc/buf : ath_descdma_setup: tx DMA map: 0xa0980000 (192000) -> 0x980000 (192000) : ath_descdma_setup: beacon DMA: 4 buffers 1 desc/buf : ath_descdma_setup: beacon DMA map: 0xa0970000 (384) -> 0x970000 (384) : ath0: AR9280 mac 128.2 RF5133 phy 13.0 : --------------< bootup >-------------- : : : --------------< setup >-------------- : xerxes# ifconfig ath0 up : ath_init: if_flags 0x8803 : ath_stop_locked: invalid 0 if_flags 0x8803 : Trap cause = 7 (bus error (load or store) - kernel mode) : [ thread pid 1809 tid 100067 ] : Stopped at platform_start+0x1b10: srl v0,a1,8 : --------------< setup >-------------- Looks a bit like the atheros bug. Try applying http://people.freebsd.org/~imp/ar71xx_ath_war.diff and including the AH_RXCFG_SDMAMW_4BYTES option in your kernel? Warner From owner-freebsd-mips@FreeBSD.ORG Sat May 1 16:33:48 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8506A106566B for ; Sat, 1 May 2010 16:33:48 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3598FC08 for ; Sat, 1 May 2010 16:33:47 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 0CBB0157562; Sat, 1 May 2010 11:33:47 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id KTT804LWXCD5; Sat, 01 May 2010 11:33:47 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <20100501.101914.634347869592892486.imp@bsdimp.com> Date: Sat, 1 May 2010 17:32:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1272703119.48777.19.camel@brain.lan.terror.local> <0CB1D579-01A7-4F60-BC57-760016FB7E47@freebsd.org> <1272729476.48777.25.camel@brain.lan.terror.local> <20100501.101914.634347869592892486.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1078) Cc: fk@bsdler.de, freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:33:48 -0000 On 1 May 2010, at 17:19, M. Warner Losh wrote: > In message: <1272729476.48777.25.camel@brain.lan.terror.local> > Florian Kruegl writes: > : Hi > :=20 > : On Sat, 2010-05-01 at 11:09 +0100, Rui Paulo wrote: > : > On 1 May 2010, at 09:38, Florian Kruegl wrote: > : >=20 > : > > Hi, > : > >=20 > : > > I get a trap when setting up wlan interface on RS pro.=20 > : >=20 > : > Maybe this is because some structure is misaligned. Can you enable = AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that = ath_debug=3D0xffffffff and ath_hal_debug=3D0xffffffff ? > : >=20 > :=20 > : --------------< bootup >-------------- > : ath0: irq 1 at device 18.0 on pci0 > : ath0: [ITHREAD] > : ath_getchannels: eeprom rd 32924 cc 156 (mapped rd 32924 cc 156) > : location I ecm > : ath_descdma_setup: rx DMA: 40 buffers 1 desc/buf > : ath_descdma_setup: rx DMA map: 0xa0923000 (3840) -> 0x923000 (3840) > : ath_descdma_setup: tx DMA: 200 buffers 10 desc/buf > : ath_descdma_setup: tx DMA map: 0xa0980000 (192000) -> 0x980000 = (192000) > : ath_descdma_setup: beacon DMA: 4 buffers 1 desc/buf > : ath_descdma_setup: beacon DMA map: 0xa0970000 (384) -> 0x970000 = (384) > : ath0: AR9280 mac 128.2 RF5133 phy 13.0 > : --------------< bootup >-------------- > :=20 > :=20 > : --------------< setup >-------------- > : xerxes# ifconfig ath0 up > : ath_init: if_flags 0x8803 > : ath_stop_locked: invalid 0 if_flags 0x8803 > : Trap cause =3D 7 (bus error (load or store) - kernel mode) > : [ thread pid 1809 tid 100067 ] > : Stopped at platform_start+0x1b10: srl v0,a1,8 > : --------------< setup >-------------- >=20 > Looks a bit like the atheros bug. Try applying > http://people.freebsd.org/~imp/ar71xx_ath_war.diff and including the > AH_RXCFG_SDMAMW_4BYTES option in your kernel? The AR9280 is based on the AR5416 MAC and it's an 11n part, so if this = only shows up on AR5212 MACs, this patch may not help. Regards, -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Sat May 1 16:45:41 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F5E81065675; Sat, 1 May 2010 16:45:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B852E8FC1C; Sat, 1 May 2010 16:45:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o41GfZYt036909; Sat, 1 May 2010 10:41:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 01 May 2010 10:41:48 -0600 (MDT) Message-Id: <20100501.104148.886429907232814478.imp@bsdimp.com> To: rpaulo@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <1272729476.48777.25.camel@brain.lan.terror.local> <20100501.101914.634347869592892486.imp@bsdimp.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: fk@bsdler.de, freebsd-mips@freebsd.org Subject: Re: Trap when setting up ath0 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:45:41 -0000 In message: Rui Paulo writes: : : On 1 May 2010, at 17:19, M. Warner Losh wrote: : : > In message: <1272729476.48777.25.camel@brain.lan.terror.local> : > Florian Kruegl writes: : > : Hi : > : : > : On Sat, 2010-05-01 at 11:09 +0100, Rui Paulo wrote: : > : > On 1 May 2010, at 09:38, Florian Kruegl wrote: : > : > : > : > > Hi, : > : > > : > : > > I get a trap when setting up wlan interface on RS pro. : > : > : > : > Maybe this is because some structure is misaligned. Can you enable AH_DEBUG and ATH_DEBUG and edit {if_ath.c,ah_osdep.c} so that ath_debug=0xffffffff and ath_hal_debug=0xffffffff ? : > : > : > : : > : --------------< bootup >-------------- : > : ath0: irq 1 at device 18.0 on pci0 : > : ath0: [ITHREAD] : > : ath_getchannels: eeprom rd 32924 cc 156 (mapped rd 32924 cc 156) : > : location I ecm : > : ath_descdma_setup: rx DMA: 40 buffers 1 desc/buf : > : ath_descdma_setup: rx DMA map: 0xa0923000 (3840) -> 0x923000 (3840) : > : ath_descdma_setup: tx DMA: 200 buffers 10 desc/buf : > : ath_descdma_setup: tx DMA map: 0xa0980000 (192000) -> 0x980000 (192000) : > : ath_descdma_setup: beacon DMA: 4 buffers 1 desc/buf : > : ath_descdma_setup: beacon DMA map: 0xa0970000 (384) -> 0x970000 (384) : > : ath0: AR9280 mac 128.2 RF5133 phy 13.0 : > : --------------< bootup >-------------- : > : : > : : > : --------------< setup >-------------- : > : xerxes# ifconfig ath0 up : > : ath_init: if_flags 0x8803 : > : ath_stop_locked: invalid 0 if_flags 0x8803 : > : Trap cause = 7 (bus error (load or store) - kernel mode) : > : [ thread pid 1809 tid 100067 ] : > : Stopped at platform_start+0x1b10: srl v0,a1,8 : > : --------------< setup >-------------- : > : > Looks a bit like the atheros bug. Try applying : > http://people.freebsd.org/~imp/ar71xx_ath_war.diff and including the : > AH_RXCFG_SDMAMW_4BYTES option in your kernel? : : The AR9280 is based on the AR5416 MAC and it's an 11n part, so if this only shows up on AR5212 MACs, this patch may not help. Ah, good point. It is only enabled for ar5212-based parts. I went ahead and committed the changes to -head for that... Warner