From owner-freebsd-current@FreeBSD.ORG Sat Jun 27 11:05:13 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A63221065670 for ; Sat, 27 Jun 2009 11:05:13 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 603538FC29 for ; Sat, 27 Jun 2009 11:05:12 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MKVia-0002iW-56 for freebsd-current@freebsd.org; Sat, 27 Jun 2009 11:05:12 +0000 Received: from 93-138-112-207.adsl.net.t-com.hr ([93.138.112.207]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Jun 2009 11:05:12 +0000 Received: from ivoras by 93-138-112-207.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Jun 2009 11:05:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Sat, 27 Jun 2009 13:05:00 +0200 Lines: 26 Message-ID: References: <4A4517BE.9040504@FreeBSD.org> <20090627101151.GA40915@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-112-207.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090612) In-Reply-To: <20090627101151.GA40915@freebsd.org> Sender: news Subject: Re: RFC: ATA to CAM integration patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2009 11:05:14 -0000 Roman Divacky wrote: > On Fri, Jun 26, 2009 at 09:47:26PM +0300, Alexander Motin wrote: >> Hi. >> >> I would like to present for testing and feedback present state of my and >> Scott work on extending CAM subsystem to support ATA in addition to >> SCSI. At this moment we have: > > this is awesome! do you plan to add support for the TRIM command support? > what would it take to teach FreeBSD to use the TRIM? GEOM knows the BIO_DELETE command, which is supposed to do what TRIM does but is currently mostly unused. I think tree things need to happen to use TRIM effectively: 1) Investigate the conditions of use of TRIM - e.g. must TRIM be applied at special alignment on media (i.e. flash block-size?), because BIO_DELETE has no alignment requirements. 2) Translate BIO_DELETE into appropriate IO command(s) in the driver(s) 3) Make file systems use BIO_DELETE (or whatever comes from it). AFAIK it has been started for UFS, I have no idea about ZFS. 3a) See if existing GEOM classes support BIO_DELETE properly (i.e. passthrough to the lower classes)