From owner-freebsd-current@FreeBSD.ORG Mon Jun 29 14:31:14 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 759BD1065674 for ; Mon, 29 Jun 2009 14:31:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id E9E4B8FC0C for ; Mon, 29 Jun 2009 14:31:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 247076398; Mon, 29 Jun 2009 17:31:10 +0300 Message-ID: <4A48D02A.4050605@FreeBSD.org> Date: Mon, 29 Jun 2009 17:31:06 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: Kamigishi Rei References: <1246206181.00132972.1246192801@10.7.7.3> <1246206186.00132982.1246194002@10.7.7.3> <1246209783.00133001.1246197001@10.7.7.3> <1246260183.00133237.1246247402@10.7.7.3> <4A48798A.5070604@FreeBSD.org> <4A487BF7.8060103@haruhiism.net> <4A48922D.5090507@FreeBSD.org> <4A48C0BC.3030104@haruhiism.net> <4A48CD19.8080606@FreeBSD.org> In-Reply-To: <4A48CD19.8080606@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org 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: Mon, 29 Jun 2009 14:31:14 -0000 Alexander Motin wrote: > Kamigishi Rei wrote: >> Alexander Motin wrote: >>> Sorry, my fault, it is the different bug, due to disabled invariants >>> I have missed two locking issues. Here is regenerated patch, >>> including this fix and all previous fixes and improvements: >>> http://people.freebsd.org/~mav/cam-ata.20090629.patch >> >> OK, a question about the module: sometimes I'm getting loads (20+) of >> messages like >> >> ahcich1: ALL SLOTS BUSY! >> >> Is it purely informational or does it indicate a problem? (I'm using >> Intel Q35+ICH9 in AHCI mode.) > > It is bad. It must never happen. It means that driver got more commands > then it has empty slots available. Results can be unpredictable. > > How have you manage it? Were there any other messages around? I think I have found possible bug triggering condition. Apply this patch please: --- ahci.c.prev 2009-06-29 12:48:45.000000000 +0300 +++ ahci.c 2009-06-29 17:25:29.000000000 +0300 @@ -986,7 +986,7 @@ ahci_begin_transaction(device_t dev, uni if (ch->slot[tag].state == AHCI_SLOT_EMPTY) break; } while (tag != ch->lastslot); - if (tag == ch->lastslot) + if (ch->slot[tag].state != AHCI_SLOT_EMPTY) device_printf(ch->dev, "ALL SLOTS BUSY!\n"); ch->lastslot = tag; /* Occupy chosen slot. */ -- Alexander Motin