From owner-cvs-src-old@FreeBSD.ORG Sat Oct 18 16:17:18 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D138D1065694 for ; Sat, 18 Oct 2008 16:17:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BED918FC1D for ; Sat, 18 Oct 2008 16:17:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9IGHI5S015529 for ; Sat, 18 Oct 2008 16:17:18 GMT (envelope-from mav@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9IGHIvO015528 for cvs-src-old@freebsd.org; Sat, 18 Oct 2008 16:17:18 GMT (envelope-from mav@repoman.freebsd.org) Message-Id: <200810181617.m9IGHIvO015528@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mav@repoman.freebsd.org using -f From: Alexander Motin Date: Sat, 18 Oct 2008 16:17:04 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/mmc mmc.c mmcreg.h mmcsd.c mmcvar.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Oct 2008 16:17:18 -0000 mav 2008-10-18 16:17:04 UTC FreeBSD src repository Modified files: sys/dev/mmc mmc.c mmcreg.h mmcsd.c mmcvar.h Log: SVN rev 184033 on 2008-10-18 16:17:04Z by mav Implement BIO_DELETE command with MMC and SD erase commands. Erase operation gives card's logic information about unused areas to help it implement wear-leveling with lower overhead comparing to usual writing. Erase is much faster then write and does not depends on data bus speed. Also as result of hitting in-card write logic optimizations I have measured up to 50% performance boost on writing undersized blocks into preerased areas. At the same time there are strict limitations on size and allignment of erase operations. We can erase only blocks aligned to the erase sector size and with size multiple of it. Different cards has different erase sector size which usually varies from 64KB to 4MB. SD cards actually allow to erase smaller blocks, but it is much more expensive as it is implemented via read-erase-write sequence and so not sutable for the BIO_DELETE purposes. Reviewed by: imp@ Revision Changes Path 1.26 +158 -93 src/sys/dev/mmc/mmc.c 1.7 +18 -1 src/sys/dev/mmc/mmcreg.h 1.14 +155 -55 src/sys/dev/mmc/mmcsd.c 1.8 +2 -0 src/sys/dev/mmc/mmcvar.h