From owner-svn-src-head@FreeBSD.ORG Mon Apr 18 23:24:55 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4459E106566C; Mon, 18 Apr 2011 23:24:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id D21D78FC0A; Mon, 18 Apr 2011 23:24:53 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3INOpLi009402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 09:24:51 +1000 Date: Tue, 19 Apr 2011 09:24:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin In-Reply-To: <4DAC91BF.7050102@FreeBSD.org> Message-ID: <20110419091915.G2406@besplex.bde.org> References: <201104181334.p3IDYVDh073304@svn.freebsd.org> <201104181306.58172.jhb@freebsd.org> <4DAC91BF.7050102@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r220777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 23:24:55 -0000 On Mon, 18 Apr 2011, Alexander Motin wrote: > On 18.04.2011 20:06, John Baldwin wrote: >> On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: >>> Author: mav >>> Date: Mon Apr 18 13:34:31 2011 >>> New Revision: 220777 >>> URL: http://svn.freebsd.org/changeset/base/220777 >>> >>> Log: >>> - Tune different wait loops to cut some more milliseconds from reset >>> time. >>> - Do not call ahci_start() before device signature received. It is >>> required >>> by the specification and caused non-fatal reset timeouts on AMD >>> chipsets. >> >> Do you have to use DELAY() here rather than a blocking sleep via pause()? > > At the moment I would say yes. These paths are called from CAM while holding > SIM lock. CAM may not like if I drop the lock in the middle of the call. Also > during recovery those functions could be called from the callout and > interrupt threads. In that case even dropping the lock won't allow thread to > sleep. More than before you reduced the delays. There seems to be no interrupt for reset, and it may be impossible for a timer to interrupt after only ~10 usec like some of the reduced delays use. > I will think more about possibilities to refactor the code to replace some > DELAYs with callouts, but requirement to keep functionality in polled mode > doesn't make the task easier. This means that callouts cannot work. Dumps should start with a reset which should run entirely in polled mode, like the entired dump. Bruce