From owner-freebsd-stable@FreeBSD.ORG Tue Feb 14 10:00:22 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A399106566B for ; Tue, 14 Feb 2012 10:00:22 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 21AF88FC14 for ; Tue, 14 Feb 2012 10:00:11 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so5404078bkc.13 for ; Tue, 14 Feb 2012 02:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=LaocPwf+wCFEGQnQ5SLV4TEamfxDvp5xf091nu21JFU=; b=QZjpTqrpHJaSSqaKmRDbHDXb4B2QEmwPuWi3tPpAZOXNRwv1SUnr7L9O9g4a81mERf l63vC+dih8IXhvJ8d/8XlwahGcjl/CTQoQ5fVlzp1YMYg0U8alSSIMluomfi+IAhCoqw ArJDIudo8q1oLWmjXm9AfxjUDiS4vCmdU81tw= Received: by 10.204.157.17 with SMTP id z17mr8578799bkw.37.1329213611072; Tue, 14 Feb 2012 02:00:11 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id i2sm54847427bkd.10.2012.02.14.02.00.09 (version=SSLv3 cipher=OTHER); Tue, 14 Feb 2012 02:00:10 -0800 (PST) Sender: Alexander Motin Message-ID: <4F3A30A7.1000601@FreeBSD.org> Date: Tue, 14 Feb 2012 12:00:07 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111227 Thunderbird/9.0 MIME-Version: 1.0 To: Victor Balada Diaz References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@FreeBSD.org Subject: Re: problems with AHCI on FreeBSD 8.2 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2012 10:00:22 -0000 On 02/14/12 11:19, Victor Balada Diaz wrote: > We're having some troubles with AHCI under FreeBSD 8.2 and 8-STABLE. The error is: > > ahcich0: Timeout on slot 8 > ahcich0: is 00000000 cs 00000100 ss 00000000 rs 00000100 tfd c0 serr 00000000 > ahcich0: AHCI reset... > ahcich0: SATA connect time=0ms status=00000123 > ahcich0: ready wait time=18ms > ahcich0: AHCI reset done: device found > (ada0:ahcich0:0:0:0): Request requeued > (ada0:ahcich0:0:0:0): Retrying command > (ada0:ahcich0:0:0:0): Command timed out > (ada0:ahcich0:0:0:0): Retrying command > ahcich0: Timeout on slot 8 > ahcich0: is 00000000 cs 007ff000 ss 007fff00 rs 007fff00 tfd c0 serr 00000000 > ahcich0: AHCI reset... > ahcich0: SATA connect time=0ms status=00000123 > ahcich0: ready wait time=84ms > ahcich0: AHCI reset done: device found > (ada0:ahcich0:0:0:0): Request requeued > (ada0:ahcich0:0:0:0): Retrying command > (ada0:ahcich0:0:0:0): Command timed out > (ada0:ahcich0:0:0:0): Retrying command > (ada0:ahcich0:0:0:0): Request requeued > [...] > > If we use old ATA driver we have no problems. If we just use the first disk (ada0) with ahci, > no problems either. If we use both disks (ada0 and ada1) in gmirror setup with ahci, we > got the above error. If we use both disks in gmirror with old ata driver, no problems. In both cases controller reports command status as 0xc0, that means device is busy with the command. For NCQ commands it means that device in in stage of processing command itself, not a head positioning or data transfer. Enabling AHCI enables NCQ for the devices. That increases load on both devices and the controller, and it is difficult to say who's fault is here. SAMSUNG HD154UI disks AFAIR have 4k sectors that may have big performance penalties when accessing small/misaligned data. I am not sure how big that penalty can be in the worst case, especially since disks by default cache writes, hiding the real load level. Relations with gmirror is harder to explain. Depending on how you created it and partitions it could cause more misaligned I/Os during rebuild. Using gmirror also double concurrent load on the controller, but at this point I have nothing to blame it for. -- Alexander Motin