From owner-freebsd-arm@FreeBSD.ORG Sun Jun 23 14:44:12 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C832D737; Sun, 23 Jun 2013 14:44:12 +0000 (UTC) (envelope-from br@mail.bsdpad.com) Received: from mail.bsdpad.com (mail.bsdpad.com [109.107.176.56]) by mx1.freebsd.org (Postfix) with ESMTP id 7E98C1F1C; Sun, 23 Jun 2013 14:44:12 +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 1UqlW6-000I3h-BU; Sun, 23 Jun 2013 18:43:46 +0400 Received: by mail.bsdpad.com (nbSMTP-1.00) for uid 1001 br@mail.bsdpad.com; Sun, 23 Jun 2013 18:43:46 +0400 (MSK) Date: Sun, 23 Jun 2013 18:43:46 +0400 From: Ruslan Bukin To: Konstantin Belousov Subject: Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory Message-ID: <20130623144346.GA69378@mail.bsdpad.com> References: <51C1F53B.2080502@semihalf.com> <51C4A067.7010203@semihalf.com> <20130623065706.GV91021@kib.kiev.ua> <20130623083220.GA41511@mail.bsdpad.com> <20130623143248.GA91021@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130623143248.GA91021@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org, Jeff Roberson , freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jun 2013 14:44:13 -0000 On Sun, Jun 23, 2013 at 05:32:48PM +0300, Konstantin Belousov wrote: > On Sun, Jun 23, 2013 at 12:32:20PM +0400, Ruslan Bukin wrote: > > On Sun, Jun 23, 2013 at 09:57:06AM +0300, Konstantin Belousov wrote: > > > > I don't really see a lot of wasted memory in the zones. There is > > > > certainly some. Can you give me sysctl vm from both a working and > > > > non-working kernel after the build is done or fails? > > > > > > Try this: > > > http://people.freebsd.org/~kib/misc/arm_bcache.1.patch > > > > > > Please _do_ notify me whether it compiled and helped with your problem. > > > > Btw, there is a problem while allocating 2GB RAM on armv7 boards > > while unmapped_buf_allowed == 1 (default): > > > > ----- > > ## Starting application at 0x40F00000 ... > > KDB: debugger backends: ddb > > KDB: current backend: ddb > > Copyright (c) 1992-2013 The FreeBSD Project. > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > The Regents of the University of California. All rights reserved. > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > FreeBSD 10.0-CURRENT #5 r252090M: Sun Jun 23 12:18:31 MSK 2013 > > root@intel.bsdpad.com:/usr/obj/arm.armv6/usr/home/br/dev/head/sys/ARNDALE arm > > FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 > > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > > CPU: Cortex A15 rev 4 (Cortex-A core) > > Supported features: ARM_ISA THUMB2 THUMBEE ARMv4 Security_Ext > > WB disabled EABT branch prediction enabled > > LoUU:2 LoC:2 LoUIS:2 > > Cache level 1: > > 32KB/64B 2-way data cache WB Read-Alloc Write-Alloc > > 32KB/64B 2-way instruction cache Read-Alloc > > Cache level 2: > > 1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc > > real memory = 2147483648 (2048 MB) > > panic: kmem_suballoc: bad status return of 3 > > ----- > > > > arm_bcache.1.patch resolves the issue above, but forced another one: > I have no idea why do you think that the patch 'forced' this issue. > > > > > ----- > > Trying to mount root from ufs:/dev/da0 []... > > WARNING: / was not properly dismounted > > warning: no time-of-day clock registered, system time will not be set accurately > > panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289 > > ----- > This is useless without a backtrace. Trying to mount root from ufs:/dev/da0 []... WARNING: / was not properly dismounted warning: no time-of-day clock registered, system time will not be set accurately panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289 KDB: enter: panic [ thread pid 1 tid 100001 ] Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 1 tid 100001 td 0xc547f620 _end() at 0xde9d0530 scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34) rsp=0xde9d0514 rfp=0xc12d1b60 Bad frame pointer: 0xc12d1b60 db> > > > > > and there are no problems at all if unmapped_buf_allowed == 0 > > > > -Ruslan