From owner-freebsd-arm@FreeBSD.ORG Fri Dec 20 12:54:07 2013 Return-Path: Delivered-To: freebsd-arm@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 85F2DB9A for ; Fri, 20 Dec 2013 12:54:07 +0000 (UTC) Received: from mail.bsdpad.com (mail.bsdpad.com [109.107.176.56]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA5F11AA for ; Fri, 20 Dec 2013 12:54:06 +0000 (UTC) Received: from mail.bsdpad.com ([109.107.176.56]) by mail.bsdpad.com with smtp (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Vtzd9-0001Rm-Ii; Fri, 20 Dec 2013 16:56:39 +0400 Received: by mail.bsdpad.com (nbSMTP-1.00) for uid 1001 br@mail.bsdpad.com; Fri, 20 Dec 2013 16:56:39 +0400 (MSK) Date: Fri, 20 Dec 2013 16:56:39 +0400 From: Ruslan Bukin To: Wojciech Macek Subject: Re: arm SMP on Cortex-A15 Message-ID: <20131220125638.GA5132@mail.bsdpad.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2013 12:54:07 -0000 On Thu, Dec 19, 2013 at 12:41:59PM +0100, Wojciech Macek wrote: > Hi, > > Finally, I'm able to run FreeBSD stable on Cortex-A15. The TLB issue which > was observed, was caused by an aggressive A15 feature called "L2 TLB > prefetch". > > There are 4 fixes that helped: > 0. Prerequisite, Olivier's patch for PCPU atomicity. > 1. TEX remap - to be compliant with spec, TEX remap is used to configure > memory as Inner Shareable > 2. TLB flush SE - after each PTE modification and PTE_SYNC, there is no > guarantee that newly created entry is not overlapped by old value in TLB > cache. Do flush_SE to ensure proper mapping. > 3. During context switch, ensure that tlb flush is executed after ttb is > changed. Clean BTB to be compliant with specs. > > Above patches can be found here > https://drive.google.com/folderview?id=0B-7yTLrPxaWteWFtWUQxVVNHVFk&usp=sharing > > > None of them is 100%-ready, but should work. Any comments and/or testing > are really appreciated. > Great!? I successfully run buildworld with these patches on SMP-enabled dual-core Cortex-A15 machine (Exynos5250) with no problems at all. My timings: kernel-toolchain - ~3h buildkernel - ~1h buildworld - ~16h Note I used NFS for mount source and obj using USB-based ethernet. The next test I will try to produce is to adding -j2 option. Thanks to all for this work! -------------------------------------------------------------- >>> World build completed on Fri Dec 20 12:47:42 UTC 2013 -------------------------------------------------------------- 57617.85 real 30765.18 user 13584.13 sys ok you have mail # # sysctl hw.ncpu hw.ncpu: 2 # -Ruslan