From owner-freebsd-arm@freebsd.org Tue Mar 22 06:14:46 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 987DCAD8D44 for ; Tue, 22 Mar 2016 06:14:46 +0000 (UTC) (envelope-from erich@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6BB1C9; Tue, 22 Mar 2016 06:14:46 +0000 (UTC) (envelope-from erich@alogt.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=HimVlmjPvrleSI6SGldmxNRKRm5c78hQNrXbtLlElDc=; b=iZjP2HDVuXw1hgxfzaA4ev6jXd AL68W0G+WxyoRLBdhLhvECgwluF0FxI8q7REo+8B3wPUj9/h/nHGO5+k8+5sajsB3dgWUaxKU9sqP /kc5Wkm6Aa/+Q1UzIWEnlogpzQaRebg2oP/S9Zm6N1WajV/olf97MIvnjX/iDyJHNy68=; Received: from [114.124.32.239] (port=53232 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_1) (envelope-from ) id 1aiFaR-003x8l-6p; Tue, 22 Mar 2016 00:14:40 -0600 Date: Tue, 22 Mar 2016 14:14:32 +0800 From: Erich Dollansky To: bob prohaska Cc: Ian Lepore , freebsd-arm@freebsd.org Subject: Re: Effect of partitioning on wear-leveling Message-ID: <20160322141432.3f0a3a61@X220.alogt.com> In-Reply-To: <20160321221153.GB83908@www.zefox.net> References: <20160321175952.GA83908@www.zefox.net> <1458586884.68920.96.camel@freebsd.org> <20160321221153.GB83908@www.zefox.net> Organization: ALO Green Technologies MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erich@alogt.com X-Authenticated-Sender: sl-508-2.slc.westdc.net: erich@alogt.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2016 06:14:46 -0000 Hi, On Mon, 21 Mar 2016 15:11:53 -0700 bob prohaska wrote: > On Mon, Mar 21, 2016 at 01:01:24PM -0600, Ian Lepore wrote: > > > > Freebsd does no wear-leveling, it's up to the microcontrollers > > within the storage devices to do that. > > > > Those controllers have no notion of partitioning or filesystem > > layout and do whatever they want to do internally about wear > > leveling. That leads to the mildly disturbing situation of having > > blocks from a readonly filesystem and blocks from a writable > > filesystem sharing the same flash erase-block inside the device. > > One likes to think of the data in a readonly filesystem as safely > > protected from the read-modify -write activity that happens at the > > flash erase-block level, but no such g'tee is made on any mmc, sd, > > or usb flash-based devices I know of. > > > > - Ian > > > Ok, thanks. It sounds like /var and /tmp could be confined to > limited-size partitions while still permitting wear leveling to use > other, less-used parts of the device. So, if a block nominally > in /var reaches end of life can the wear leveling controller start > stashing data anywhere on the device? > > As a practical matter, should I even be worrying about this? Folks > once made a big deal of partitioning storage so a runaway process > couldn't choke the whole machine. Is the precaution still worth > taking on ARM? > we use memory disk for /var and /tmp. If you really need the content of these directories, you could write them back to flash by a script every hour or so and save all the writes between. Do not forget the flash devices used in Raspberries & Co. cannot be compared with the flash devices used in flash disk. Erich