From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 29 11:06:52 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA56310656AC for ; Mon, 29 Dec 2008 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BF9138FC35 for ; Mon, 29 Dec 2008 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mBTB6qhc024398 for ; Mon, 29 Dec 2008 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mBTB6qDT024394 for freebsd-embedded@FreeBSD.org; Mon, 29 Dec 2008 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Dec 2008 11:06:52 GMT Message-Id: <200812291106.mBTB6qDT024394@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 30 03:37:48 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 313961065670 for ; Tue, 30 Dec 2008 03:37:48 +0000 (UTC) (envelope-from matt@smiffytech.com) Received: from prospero.kbc.net.au (prospero.kbc.net.au [150.101.97.167]) by mx1.freebsd.org (Postfix) with ESMTP id D72338FC08 for ; Tue, 30 Dec 2008 03:37:47 +0000 (UTC) (envelope-from matt@smiffytech.com) Received: from [10.10.10.212] (brutus_ii [10.10.10.212]) by prospero.kbc.net.au (Postfix) with ESMTP id E9DA49D661 for ; Tue, 30 Dec 2008 13:52:39 +1030 (CST) Message-ID: <495993FF.1060701@smiffytech.com> Date: Tue, 30 Dec 2008 13:52:39 +1030 From: Matthew Smith User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: FreeBSD Embedded X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Best FreeBSD version for NanoBSD on an old SBC X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 03:37:48 -0000 Hi Folks I am putting together a machine to act as a GPS-disciplined time server (NTPd with kernel PPS) and acquire data from my 1-Wire weather system (OWW). The hardware I have to hand are a Pentium SBC with 16Mb RAM and a 12Gb laptop disc. I assume that the best OS to put on this would be NanoBSD but was wondering if there was a specific version of FreeBSD that would be best to base it on. (Recent experience with a certain other Unix-like OS has taught me that newer versions suck with older hardware; I don't know if this is the case with FreeBSD.) I can get away with putting a bigger disc on although I don't particularly want to as this would cause issues with the power supply. (Using a vehicle power supply so that I can run it on float-charged gel cells.) The RAM, however, can't go any bigger. Any advice on this would be appreciated. Cheers M -- Matthew Smith Smiffytech - Technology Consulting & Web Application Development Business: http://www.smiffytech.com/ Personal: http://www.smiffysplace.com/ LinkedIn: http://www.linkedin.com/in/smiffy From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 30 04:02:32 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EDD2106566B for ; Tue, 30 Dec 2008 04:02:32 +0000 (UTC) (envelope-from philip.mullis@syx.ca) Received: from smtpout1.syx.ca (smtpout1.syx.ca [69.77.170.152]) by mx1.freebsd.org (Postfix) with ESMTP id 382EF8FC18 for ; Tue, 30 Dec 2008 04:02:32 +0000 (UTC) (envelope-from philip.mullis@syx.ca) Received: from mail.syx.ca (unknown [192.168.21.1]) by smtpout1.syx.ca (Postfix) with ESMTP id E8E55182BA2 for ; Mon, 29 Dec 2008 22:42:43 -0500 (EST) Received: from [192.168.22.188] ([192.168.22.188]) by mail.syx.ca with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Dec 2008 22:42:43 -0500 Message-ID: <495998B3.4010008@syx.ca> Date: Mon, 29 Dec 2008 22:42:43 -0500 From: Philip Mullis User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Matthew Smith References: <495993FF.1060701@smiffytech.com> In-Reply-To: <495993FF.1060701@smiffytech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Dec 2008 03:42:43.0812 (UTC) FILETIME=[AC47A240:01C96A30] Cc: FreeBSD Embedded Subject: Re: Best FreeBSD version for NanoBSD on an old SBC X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 04:02:32 -0000 you have to check the hardware in detail and make sure all the chipsets are supported, youll also want to research if there are any major imporements to driver support in later FreeBSD versions, that been said you can make some tiny foot prints and with kernel customization and packages you can fit a hapilty running os running 7.x on a 256meg card, i have 6.4 in a 14meg gz'd which mfsroot's on boot. so what you have seems quick ample you'll just need to make sure to trim where possible 6.x or 7.x its your choice, but research first. Hope that helps some Regards, Philip Mullis Matthew Smith wrote: > Hi Folks > > I am putting together a machine to act as a GPS-disciplined time > server (NTPd with kernel PPS) and acquire data from my 1-Wire weather > system (OWW). > > The hardware I have to hand are a Pentium SBC with 16Mb RAM and a 12Gb > laptop disc. > > I assume that the best OS to put on this would be NanoBSD but was > wondering if there was a specific version of FreeBSD that would be > best to base it on. (Recent experience with a certain other Unix-like > OS has taught me that newer versions suck with older hardware; I don't > know if this is the case with FreeBSD.) > > I can get away with putting a bigger disc on although I don't > particularly want to as this would cause issues with the power supply. > (Using a vehicle power supply so that I can run it on float-charged > gel cells.) The RAM, however, can't go any bigger. > > Any advice on this would be appreciated. > > Cheers > > M > From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 30 17:20:52 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D334106566B for ; Tue, 30 Dec 2008 17:20:52 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id D41188FC1F for ; Tue, 30 Dec 2008 17:20:51 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 4DF0E1FD268; Tue, 30 Dec 2008 12:01:03 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 30 Dec 2008 12:01:03 -0500 X-Sasl-enc: whVjMClzJNgvSnwixxk4LMjARa8bd2K3AgZm7j0E1Acc 1230656462 Received: from empiric.lon.incunabulum.net (unknown [81.168.51.182]) by mail.messagingengine.com (Postfix) with ESMTPSA id 9629C2D671; Tue, 30 Dec 2008 12:01:02 -0500 (EST) Message-ID: <495A53CD.7070007@FreeBSD.org> Date: Tue, 30 Dec 2008 17:01:01 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.18 (X11/20081205) MIME-Version: 1.0 To: Matthew Smith References: <495993FF.1060701@smiffytech.com> In-Reply-To: <495993FF.1060701@smiffytech.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Embedded Subject: Re: Best FreeBSD version for NanoBSD on an old SBC X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 17:20:52 -0000 Matthew Smith wrote: > Hi Folks > > I am putting together a machine to act as a GPS-disciplined time > server (NTPd with kernel PPS) and acquire data from my 1-Wire weather > system (OWW). > > The hardware I have to hand are a Pentium SBC with 16Mb RAM and a 12Gb > laptop disc. > > I assume that the best OS to put on this would be NanoBSD but was > wondering if there was a specific version of FreeBSD that would be > best to base it on. (Recent experience with a certain other Unix-like > OS has taught me that newer versions suck with older hardware; I don't > know if this is the case with FreeBSD.) NanoBSD is absolutely great. XORP, Inc. are using it for their LiveCD/LiveUSB builds at the moment. I got good results on a 400MHz Celeron w/128MB of memory. The key thing is to be able to leave enough in the base install for what you need -- it doesn't strip absolutely everything, and whilst the XORP LiveCD is now considerably smaller, and thus quicker to download, than it was (thanks to NanoBSD), it is quite a generic place to start: http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/other/LiveCD/ The stuff there is intended to be checked out and copied 'on top' of a FreeBSD 7-STABLE source tree checkout. The USB stick generation stuff has been merged back to FreeBSD itself, but not the LiveCD bits. Of course NanoBSD would work just fine w/o the patches for making ATA drive images. You would probably do much better with CompactFlash in your rig. For DRAM, 16MB may be seriously pushing it now, 32MB is really a realistic minimum for FreeBSD on x86 these days on any platform. > > I can get away with putting a bigger disc on although I don't > particularly want to as this would cause issues with the power supply. > (Using a vehicle power supply so that I can run it on float-charged > gel cells.) The RAM, however, can't go any bigger. Gels are nice, though I believe they can't be reconditioned. Of course the embeddability situation should get better as time goes on. I would LOVE to see pfSense running on non-x86 embedded hardware. Don't forget I have an Emprex STR9104 ARM to donate to an interested developer. cheers, BMS From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 30 23:07:30 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1590106564A for ; Tue, 30 Dec 2008 23:07:30 +0000 (UTC) (envelope-from matt@smiffytech.com) Received: from prospero.kbc.net.au (prospero.kbc.net.au [150.101.97.167]) by mx1.freebsd.org (Postfix) with ESMTP id 320E18FC13 for ; Tue, 30 Dec 2008 23:07:30 +0000 (UTC) (envelope-from matt@smiffytech.com) Received: from [10.10.10.212] (brutus_ii [10.10.10.212]) by prospero.kbc.net.au (Postfix) with ESMTP id B4FD3BF4008 for ; Wed, 31 Dec 2008 09:37:28 +1030 (CST) Message-ID: <495AA9B0.9050104@smiffytech.com> Date: Wed, 31 Dec 2008 09:37:28 +1030 From: Matthew Smith User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: FreeBSD Embedded References: <495993FF.1060701@smiffytech.com> <495A53CD.7070007@FreeBSD.org> In-Reply-To: <495A53CD.7070007@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Best FreeBSD version for NanoBSD on an old SBC X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 23:07:31 -0000 Thanks for your reply, Bruce. Quoth Bruce M. Simpson at 2008-12-31 03:31... ... > The key thing is to be able to leave enough in the base install for > what you need -- it doesn't strip absolutely everything, and whilst the > XORP LiveCD is now considerably smaller, and thus quicker to download, > than it was (thanks to NanoBSD), it is quite a generic place to start: > http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/other/LiveCD/ Ta. I'll have a look at that. > Of course NanoBSD would work just fine w/o the patches for making > ATA drive images. You would probably do much better with CompactFlash in > your rig. For DRAM, 16MB may be seriously pushing it now, 32MB is really > a realistic minimum for FreeBSD on x86 these days on any platform. Not sure if CF would be totally suitable for this as I believe that ntpd needs to do a lot of logging - don't know if CF still has the issue with a finite number of writes. (Also trying to do this on virtually zero budget and with what I've got so don't really want to start forking out for extra bits.) I'm surprised about the RAM though seeing as how my first Unix box (IBM 6150), which ran the whole company, started off with only 8Mb! (And that was a card about the size of a keyboard.) I've run minimal Linux distributions on this hardware (the x86 SBC, not the 6150) so wonder what in FreeBSD is gobbling up the resources - and whether it can be pruned out. I'm sure that there is a load of stuff in the kernel that is unnecessary for simple, old, hardware on a headless machine - but then maybe this is already removed on NanoBSD. > Gels are nice, though I believe they can't be reconditioned. > Of course the embeddability situation should get better as time goes on. This is and physically small alternative to yet another UPS - and should probably be able to run the system for a fair while too. I should be able to squeeze these, 13.8V PSU, the SBC, GPS module and 1-Wire interface all into an old PC case. Cheers M -- Matthew Smith Smiffytech - Technology Consulting & Web Application Development Business: http://www.smiffytech.com/ Personal: http://www.smiffysplace.com/ LinkedIn: http://www.linkedin.com/in/smiffy From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 30 23:20:25 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213CB106566B for ; Tue, 30 Dec 2008 23:20:25 +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 B926F8FC08 for ; Tue, 30 Dec 2008 23:20:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBUNHrlP005941; Tue, 30 Dec 2008 16:17:53 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 30 Dec 2008 16:18:04 -0700 (MST) Message-Id: <20081230.161804.1573371236.imp@bsdimp.com> To: matt@smiffytech.com From: "M. Warner Losh" In-Reply-To: <495AA9B0.9050104@smiffytech.com> References: <495993FF.1060701@smiffytech.com> <495A53CD.7070007@FreeBSD.org> <495AA9B0.9050104@smiffytech.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Best FreeBSD version for NanoBSD on an old SBC X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 23:20:25 -0000 In message: <495AA9B0.9050104@smiffytech.com> Matthew Smith writes: : Thanks for your reply, Bruce. : : Quoth Bruce M. Simpson at 2008-12-31 03:31... : ... : > The key thing is to be able to leave enough in the base install for : > what you need -- it doesn't strip absolutely everything, and whilst the : > XORP LiveCD is now considerably smaller, and thus quicker to download, : > than it was (thanks to NanoBSD), it is quite a generic place to start: : > http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/other/LiveCD/ : Ta. I'll have a look at that. : : > Of course NanoBSD would work just fine w/o the patches for making : > ATA drive images. You would probably do much better with CompactFlash in : > your rig. For DRAM, 16MB may be seriously pushing it now, 32MB is really : > a realistic minimum for FreeBSD on x86 these days on any platform. : Not sure if CF would be totally suitable for this as I believe that ntpd : needs to do a lot of logging - don't know if CF still has the issue with : a finite number of writes. (Also trying to do this on virtually zero : budget and with what I've got so don't really want to start forking out : for extra bits.) CF is fine for this application. Most CF cards can cope with the limited traffic of an NTP server. : I'm surprised about the RAM though seeing as how my first Unix box (IBM : 6150), which ran the whole company, started off with only 8Mb! (And : that was a card about the size of a keyboard.) I've run minimal Linux : distributions on this hardware (the x86 SBC, not the 6150) so wonder : what in FreeBSD is gobbling up the resources - and whether it can be : pruned out. I'm sure that there is a load of stuff in the kernel that : is unnecessary for simple, old, hardware on a headless machine - but : then maybe this is already removed on NanoBSD. You can run FreeBSD on a 16MB box, but you have to do some careful tricks to change the current bias in optimization of the kernel from speed to size. And you have to carefully prune your kernel to the bone. And you have to trim the applications that are run as well, since that's where the bulk of the memory usage comes from. Linux has these same issues, the knobs to optimize for them are better labeled and documented. Warner From owner-freebsd-embedded@FreeBSD.ORG Wed Dec 31 11:18:48 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386FE106566C; Wed, 31 Dec 2008 11:18:48 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id ECC058FC0C; Wed, 31 Dec 2008 11:18:47 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id mBVBIk33019336; Wed, 31 Dec 2008 04:18:46 -0700 Message-ID: <495B5531.8040604@semihalf.com> Date: Wed, 31 Dec 2008 12:19:13 +0100 From: Grzegorz Bernacki MIME-Version: 1.0 To: Marcel Moolenaar References: <494BAA90.7000801@semihalf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arm@freebsd.org, embedded@freebsd.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 11:18:48 -0000 Marcel Moolenaar wrote: > > On Dec 19, 2008, at 6:07 AM, Grzegorz Bernacki wrote: > >> 2. Root cause. >> The root cause of the problem is additional virtual mapping of read/write >> buffers at cluster read/write (sys/kern/vfs_cluster.c, cluster_rbuild(), >> cluster_wbuild(). Buffers for sequential read/write operation are >> concatenated >> and sent to device as one big buffer. Concatenation of buffers uses >> pmap_qenter(), which puts *additional* mapping in the KVA for physical >> area >> already mapped. For each buffer we extract pages it contains and then >> all the >> pages from all the buffers are mapped into new virtual address of new >> buffer. >> So we end up with at least two virtual addresses for each page. > > Could this also affect I-cache coherency by virtue of not > flushing the D-cache properly before synchronizing the > I-cache, as you mention reading? > I am not sure. I can't think of scenario which might lead to I-cache incoherency. Have you experienced any issues with I-cache which might be related described problem? pozdrawiam, Grzesiek From owner-freebsd-embedded@FreeBSD.ORG Wed Dec 31 14:32:17 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D3C11065672; Wed, 31 Dec 2008 14:32:17 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3740C8FC17; Wed, 31 Dec 2008 14:32:17 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id mBVEWGGk047500; Wed, 31 Dec 2008 08:32:16 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1230733936; bh=aaaxbB/uAZe2tbfDF3E6dzb3PSd0MV69SrigECO +HqI=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=BtrGC8wg XPdhAhEW7Hw8GWRmLQ1oTbaaHnLFiyylZo5NmjsYexxcj2Ya9CEBZIV5Wau54QXR5QG qDOxujlwhHSB+HZ2ZDaYAVuLpVLOqGCmLipOsLKToWC5HlDaf/mbcqOau0ETwaiw7wZ +wAokuYWQqpRAOOOcACilDkdCRC7M= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id mBVEWF6O047499; Wed, 31 Dec 2008 08:32:15 -0600 (CST) (envelope-from tinguely) Date: Wed, 31 Dec 2008 08:32:15 -0600 (CST) From: Mark Tinguely Message-Id: <200812311432.mBVEWF6O047499@casselton.net> To: gjb@semihalf.com, xcllnt@mac.com In-Reply-To: <495B5531.8040604@semihalf.com> Cc: arm@freebsd.org, embedded@freebsd.org Subject: Re: Multiple virtual mappings considered harmful on ARM X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 14:32:18 -0000 > Marcel Moolenaar wrote: > > > > On Dec 19, 2008, at 6:07 AM, Grzegorz Bernacki wrote: > > > >> 2. Root cause. > >> The root cause of the problem is additional virtual mapping of read/write > >> buffers at cluster read/write (sys/kern/vfs_cluster.c, cluster_rbuild(), > >> cluster_wbuild(). Buffers for sequential read/write operation are > >> concatenated > >> and sent to device as one big buffer. Concatenation of buffers uses > >> pmap_qenter(), which puts *additional* mapping in the KVA for physical > >> area > >> already mapped. For each buffer we extract pages it contains and then > >> all the > >> pages from all the buffers are mapped into new virtual address of new > >> buffer. > >> So we end up with at least two virtual addresses for each page. > > > > Could this also affect I-cache coherency by virtue of not > > flushing the D-cache properly before synchronizing the > > I-cache, as you mention reading? > > > > I am not sure. I can't think of scenario which might lead to I-cache incoherency. > Have you experienced any issues with I-cache which might be related described problem? > > pozdrawiam, > Grzesiek If would be surprised for you to see an I-cache problems. pmap_qenter() writes back any managed cache pages (already under the control of a pv_entry) and then calls pmap_kenter_internal(), which tries to writeback and invalid any previously mapped pages. At the end of the pmap_qenter() the caches are clean. The problem is the new mapping is added with cache turned on, and the old mapping's page table caching is not modified either, so if either side modifies the page, there can be this caching problem. I think that the pmap_kenter_internal() should become a special kind of managed page (controlled by a pv_entry and a special flag, (I called PVF_UNMAN) that runs through the pmap_fix_cache(), so the mappings for the shared page should have the cache turned off. There are special checks The less obvious question is should PG_UNMANAGED pages be simularly managed? Or put another way, could the PG_UNMANAGED page be remapped by the I/O caching programs? My guts says yes. Doing so also forces BUS_DMA_COHERENT pages to turn off the caches on the share page. I have a crude workup of my idea, but I have to admit, I don't have the equipment to even try to compile it. There concerns about pv_entry use increase, there is lock issues, performance, and even could we cause a problem trying get a pv_entry at the wrong time, such as interrupt. Maybe the kernel pv_entrys need to come from a special pool. I have some crude ideas to flush the caches less often in the ARM11's virtual index / physical tag caches and ideas for the multicore physical index / physical tag cache. --Mark Tinguely