From owner-freebsd-current@FreeBSD.ORG Tue Dec 21 07:07:14 2010 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 17EAF106566C; Tue, 21 Dec 2010 07:07:14 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by mx1.freebsd.org (Postfix) with ESMTP id 757238FC14; Tue, 21 Dec 2010 07:07:13 +0000 (UTC) Received: by fxm19 with SMTP id 19so3499006fxm.36 for ; Mon, 20 Dec 2010 23:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=gJ2TDkLcS03Wb5zbMJAwtBlde8h9A6uKpahdqhzJy5s=; b=VZQZL/9gmoO8aEuhSmwp3C9DxjvDoC8/iU28bPmfUKuh46NM2p3rxDbEHunAPuvhTR AdMprR27cMmcjkOpyxBYTM83EXbp0ksnAs69BuozJIaG7ayon8qze5zOZhI5Ph3GUSit W8Gpn6PYoJ9yHVG9O7eA6RTO8wPabr3FJUTEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Jp+WAx0fs1psjedix6B3BcYr7DEzEPtrXPblJYj+PqNMrzrh7cirVYk5O5igf7/Z1w o/B6SOJq89Cy48Zlcl8E8HzbmJbp3AutC2ZLnoBl242CVzOEAaAqPslUuickALcc8DVd UEyYZEs2iUPWhHrhkUu1vYgL8H5XEEfff6Dvo= Received: by 10.223.78.205 with SMTP id m13mr946660fak.79.1292915232346; Mon, 20 Dec 2010 23:07:12 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id n26sm1197861fam.13.2010.12.20.23.07.10 (version=SSLv3 cipher=RC4-MD5); Mon, 20 Dec 2010 23:07:11 -0800 (PST) Sender: Alexander Motin Message-ID: <4D10520C.8010202@FreeBSD.org> Date: Tue, 21 Dec 2010 09:06:52 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Alexander Best References: <20101220231005.GA68477@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Current , Xin LI Subject: Re: two ata write chaching request 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: Tue, 21 Dec 2010 07:07:14 -0000 Xin LI wrote: > On 12/20/10 15:10, Alexander Best wrote: >> i'd really like to see > >> 1) write caching to be turned on and off for individual hdds >> (i.e. hw.ata.X.wc) and > > This is possible. We may need to split the logic out from ad_init() as > the disk number is not known at that point if I understood the code > correctly. ad_init() receives newbus device as an argument, so it does have the disk number. >> 2) to be able to turn write chaching on and off on the fly. > > If I understand the code correctly, this is merely issuing a SETFEATURE > at runtime and *should* be possible. The problem is atacontrol(8) does > not offer a way to issue the command directly as camcontrol(8) do. > >> any thoughts on these two topics? is it technically possible? It is possible, but I would recommend you to focus on CAM-based ATA. As first step you can easily execute SETFEATURE command just from camcontrol tool. As second, it could be added to adastart()/adadone() to be executed on each device attach/reset, same as in ad_init(). -- Alexander Motin