From owner-freebsd-small@FreeBSD.ORG Thu May 18 17:06:20 2006 Return-Path: X-Original-To: freebsd-small@freebsd.org Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC2DF16A649 for ; Thu, 18 May 2006 17:06:20 +0000 (UTC) (envelope-from mf.danger@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B25043D6A for ; Thu, 18 May 2006 17:06:12 +0000 (GMT) (envelope-from mf.danger@gmail.com) Received: by nf-out-0910.google.com with SMTP id x29so74997nfb for ; Thu, 18 May 2006 10:06:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BrUV1hzCai3r6Kd9QoWPBM18zyw+qlhJZArnOFyTa7VxNvD70JkY47QwpyNCeR1FdoZnT7Cc9pbJxnxyDQEfjEZpwvq6fFnYbezMCWvzInxPhFszIpljTo+nb8rALWNkc893A0cHdfqRcqoMZtwcloijViEnJpx2iy4YCFuRnxQ= Received: by 10.48.205.7 with SMTP id c7mr734239nfg; Thu, 18 May 2006 10:06:10 -0700 (PDT) Received: by 10.49.55.14 with HTTP; Thu, 18 May 2006 10:06:09 -0700 (PDT) Message-ID: <9f7850090605181006m56c38a56lcc7037beaf6b6fa@mail.gmail.com> Date: Thu, 18 May 2006 10:06:09 -0700 From: "marty fouts" To: "Jim Thompson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <446BBE65.50104@FreeBSD.org> <9f7850090605171746p5ff4dbefq46211ce93aafc116@mail.gmail.com> <446C2380.6020000@FreeBSD.org> Cc: gnn@freebsd.org, freebsd-small@freebsd.org Subject: Re: Flash File Systems or Translation Layers? X-BeenThere: freebsd-small@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: Thu, 18 May 2006 17:06:20 -0000 On 5/18/06, Jim Thompson wrote: > > There is at least one 'other' important bootloader for this work: > 'redboot'. (But redboot supports (or can be made to support) jffs2. > The ARM board I'm currently using has redboot on it, so I've done some investigation. It looks like ecos/redboot are pretty much dead. > Still having a bootloader that knows how to 'read' the filesystem > isn't that important, as long as you can store the kernel somewhere > other than >in< the filesystem. No "dinking" needed. (are you > aware that 'dink' is also a bootloader (for ppc)?) Agreed. This seems to be a common approach in shipping devices, and it has advantages that make it appealing. > We >do< want a FTL or FFS, it doesn't >have< to be JFFS2, but JFFS2 > has many nice features (on the fly compression, wear-leveling, etc.) > so its worth studying, at least. JFFS2 has a built in design flaw. The 'node' model that it uses requires that the entire file system be read during boot. On large NAND devices with nearly full file systems, this can lead to long delays before the file system is in a state where it can be written to. (I've seen delays of over 20 minutes on actual devices.) This is why the authors were off designing JFFS3. Definitely investigate JFFS2, especially reading the archives of the MTD mailing list, but I'd strongly advise against modeling a system on its data structures. At PalmSource last year, Mike Chen and myself did an implementation of LFS that was NAND-aware for PalmOS Cobalt (the one that never shipped) that seemed to have reasonable performance. For NAND there's also YAFFS2, which is GPLed, and so would need to be studied rather than used. (The YAFFS mailing list has a few discussions on the limitations of the MTD layer wrt to file systems, also.) I'm aware of several commercial flash file systems for NAND and they've all taken the approach of having a block-translation layer that handles all of the wear-leveling and block remapping issues. Having worked on NAND file systems tof both kinds, I'd particularly recommned the separation model.