From owner-freebsd-arm@FreeBSD.ORG Thu Mar 6 13:38:31 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 489EC986; Thu, 6 Mar 2014 13:38:31 +0000 (UTC) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E93FC386; Thu, 6 Mar 2014 13:38:30 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id w8so2492636qac.12 for ; Thu, 06 Mar 2014 05:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hlcAdSlZwD9HFEuAeiZ/u+FUumXgVtZRJr2ep1jOMmE=; b=G0t62ZT/tXNQIxErT2b4IIw3wEIF/hACfcVm1bqPyCLIB2kIDjMEdD8d6NgrfaW7XU 4yLNk7su6ir16PW/uUVu0kNQghvlLuzQ/DBZRzcI7LCd6229AvnEZ1bFgktYwTXY1+cz /QYLotqH1/EhPZqRWC7IREwMdkFzG5ghYD55AT0y2YiMhrP87Rv8tXo0qNYVk5JzKLJt bFn96Kr6Jvq5gl4s+sTJv73GGLhj822Ms539LiwHNpZDFiYw8ofXguAOqRz0/JrnoUTx ilI3ig+UrL39jyDI2Awnef8RovCvDPcDiKknp70pc6x/mR2FH/4zOpr/o3JOCtxAa3us 7dgQ== MIME-Version: 1.0 X-Received: by 10.140.88.212 with SMTP id t78mr13349671qgd.47.1394113110116; Thu, 06 Mar 2014 05:38:30 -0800 (PST) Received: by 10.140.31.69 with HTTP; Thu, 6 Mar 2014 05:38:30 -0800 (PST) In-Reply-To: <1393977031.1149.325.camel@revolution.hippie.lan> References: <1393977031.1149.325.camel@revolution.hippie.lan> Date: Thu, 6 Mar 2014 14:38:30 +0100 Message-ID: Subject: Re: Pandaboard ES and SD card From: Svatopluk Kraus To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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: Thu, 06 Mar 2014 13:38:31 -0000 On Wed, Mar 5, 2014 at 12:50 AM, Ian Lepore wrote: > On Mon, 2014-03-03 at 17:12 +0100, Svatopluk Kraus wrote: > > Hi, > > > > I finally have found time to install FreeBSD 11.0-CURRENT on Pandaboard > ES > > on my table. It's been installed to SD card. When I boot to multiuser, > > it's very very slow. It looks that SD card write performance is very > poor. > > When I boot to singleuser, it's OK. However, when I make root filesystem > > read-write by one command and immediately readonly by second one, the > > second one takes a few minutes to finish. > > > > When I've digged in arm/ti/ti_mmchs.s, I've got following times for READ > > and WRITE commands: > > > > typical read times (start & duration & command), > > ... > > [1393858258.909d4fb4650dcb70] [0.002f97afec8ba994] READ > > [1393858258.929795e2f7db5ec0] [0.002f90d496ec7d4c] READ > > [1393858258.9492673f18af4ec0] [0.002f9d607a66e41c] READ > > [1393858258.968d155674da0d5e] [0.002f937e2ea37cca] READ > > [1393858258.988790d78e6fd5a2] [0.002f9eb09b235414] READ > > [1393858258.9a78744ecab1413e] [0.002f90dded2a9cda] READ > > [1393858258.9c735a3cec62b616] [0.002f97cbef46083e] READ > > [1393858258.9e6ee0b8064ec2aa] [0.002f933cd2f09fe8] READ > > [1393858258.a069e2838966634a] [0.002f959262788368] READ > > [1393858258.a26467518add9a00] [0.002f8f9722ac4c70] READ > > [1393858258.a45e59f14fb6c986] [0.002f9d31cb304656] READ > > [1393858258.a659525d3e70bc98] [0.002f8ae2ad5e65e2] READ > > [1393858258.a853df0c0452931e] [0.002f9cd46cc30aca] READ > > ... > > > > typical write times (start & duration & command). > > ... > > [1393856255.8be604dff29d07a0] [0.00d9cf712d331d58] WRITE > > [1393856255.8e9100859c4fedd2] [0.00da3f856cebe4e6] WRITE > > [1393856255.913c1530607b6288] [0.00da8f1a826cd93a] WRITE > > [1393856255.93e7b97bcc483d9a] [0.00dad6ced3832dbe] WRITE > > [1393856255.9693e68c8a1752c0] [0.2276ea0a1d732724] WRITE <- > > [1393856255.badca6f90c5564ea] [0.22df71f44f623e3e] WRITE <- > > [1393856255.df8e42a6890234a4] [0.24ae2f1172203ed0] WRITE <- > > [1393856256.060e4c7acd0c290a] [0.00e76cb09c67c3ba] WRITE > > [1393856256.08c68da8b0554498] [0.00e7b1d75881776a] WRITE > > [1393856256.0b7f57d3eb15578e] [0.00e83c08cdfa8020] WRITE > > [1393856256.0e36d38be88f1e08] [0.00e882dd093ddf54] WRITE > > [1393856256.10f0762d8d8cbe10] [0.00e8c0f06a43a968] WRITE > > [1393856256.13aa6a2dc9ef5c9a] [0.00e938916637f4c8] WRITE > > [1393856256.1664fc08109773d4] [0.22b74fce5c0401e2] WRITE <- > > [1393856256.3aedb9baa4273c8e] [0.2305517892cef37c] WRITE <- > > [1393856256.5fc52a62081f2238] [0.24aaf338d2067a84] WRITE <- > > [1393856256.8641d9129fd99066] [0.00e770cfadd3b168] WRITE > > [1393856256.88fae819e4c25a9c] [0.04d7472f5f571cbc] WRITE > > ... > > > > Times are struct bintime printed in %lld.%016llx (sec.frac) format. > > > > Writing times have got really big variation. > > Any idea or experience? > > > > Svatopluk Kraus > > > > PS. Of course, I don't mention occasional "Spurious interrupt detected" > > print. > > The ti_mmchs driver does all IO one sector at a time, and single-sector > writes are the worst case for sdcard performance. I've seen > single-sector writes go as slow as 20K/sec. > Well, at least I'm not alone. Thanks for sharing your experience. > Try switching to the ti_sdhci driver (switch the entry in files.omap4). > I don't know for sure that ti_sdhci will work with pandaboard, it's only > been tested on beaglebone that I know of. But if it works you should > see read speeds around 16MB/sec and writes at about 7MB/sec. > I've tried to switch to it. However, it does not work. Inserted card is not detected and when it's hacked, the card is not recognized. % mmc0: on sdhci_ti0 % mmc0: SD probe: failed % mmc0: MMC probe: failed % mmc0: Current OCR: 0x00000000 % mmc0: No compatible cards found on bus When ti_sdhci.c and sdhci.c are compared with ti_mmchs.c, there are many things implemented differently. HW initialization is more complex in ti_mmchs.c and some things are even missing in ti_shdci.c (and its MI part sdhci.c). I'm not sure what is better to start with. To implement multi-block mode into ti_mmchs.c or to fix ti_shdci.c. The first looks easier for me. The second can lead to either fixing MI sdhci.c and/or bypassing it in large. > The "mount -uw / ; mount -ur /" is a completely separate thing. That > takes about 30 seconds on every sdcard-based system I have. I don't > know why, but it's really annoying. I don't think it's a driver thing, > it happens with several different drivers. > > -- Ian Hmmm, so in my case it's only much worse. Svatopluk Kraus