From owner-freebsd-mips@FreeBSD.ORG Thu Aug 28 22:19:03 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4F6566E for ; Thu, 28 Aug 2014 22:19:03 +0000 (UTC) Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.225]) by mx1.freebsd.org (Postfix) with ESMTP id 9626F19A1 for ; Thu, 28 Aug 2014 22:19:03 +0000 (UTC) Received: from [76.187.139.93] ([76.187.139.93:54733] helo=[192.168.0.240]) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 82/33-14619-0DAAFF35; Thu, 28 Aug 2014 22:18:56 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: FreeBSD 10.0-STABLE on EdgeRouter Lite notes/issues From: Stacey Son In-Reply-To: <89108FE4-59E2-471B-AF9D-AAAA9E02A4B0@bsdimp.com> Date: Thu, 28 Aug 2014 17:18:55 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <89108FE4-59E2-471B-AF9D-AAAA9E02A4B0@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1878.6) X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2014 22:19:03 -0000 Hi Warner... On Aug 28, 2014, at 3:06 PM, Warner Losh wrote: >=20 > On Aug 28, 2014, at 12:59 PM, Stacey Son wrote: >=20 >>=20 >>> Regarding https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D177876 = -- >>> is this patch still a good idea? Or has it been merged? >>=20 >> I have been using it for some time. If you plan on mounting and = using NFS volumes or anything else the might take a lot of kernel thread = stack space then it is a good idea. >>=20 >> A better version of this patch (that moves the mips dependent code = out of the vm layer) has been merged into a MIPS64 FreeBSD project and = that code will be upstreamed sometime in the near future. You can find = the changes here: >>=20 >> = https://github.com/CTSRD-CHERI/cheribsd/commit/b39bec2cefe36293ffb2322969c= 9f7c9cae8c1a2 >>=20 >> = https://github.com/CTSRD-CHERI/cheribsd/commit/04ea99d04f6d5a595be759d34e8= 4e7fd9cea8166 >=20 > I don=92t suppose this could be done w/o adding #ifdef __mips__ to = vm_glue? No need to block upstreaming on this, but it seems this could = be a MD routine instead... The plan is to add vm_kstack_valloc()'s and vm_kstack_palloc()'s to each = ${ARCH}/vm_machdep.c. Of course, it is there for mips but the non-mips = arch version needs to be added. Once the non-mips version is added the = #ifdef __mips__'s in vm_glue.c can go away. Note that this does replace = a bit of #ifdef __mips__ wrapped code that was already in vm_glue.c. >=20 >> = https://github.com/CTSRD-CHERI/cheribsd/commit/ae4f8d84bc30ffe2b2698534a2e= 6ab64480e8432 >=20 > On the whole, I really like this, but was hoping it would be cleaner. = There=92s a crying need for it=85 You may have noticed that this FreeBSD branch also includes my older = change for increasing the kstack size by using multiple wired TLB = entries. When "option KSTACK_LARGE_PAGE" is not in the kernel config it = defaults to using that for __mips_n64. This, of course, makes switch.S = a bit messy. At some point it might be good to generate some of this = lower level code at boot time depending on the mips hardware that is = detected. Especially for critical code like the TLB miss exception = handler. -stacey.=