svn commit: r220777 - head/sys/dev/ahci

Bruce Evans brde at optusnet.com.au
Mon Apr 18 23:24:55 UTC 2011


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


More information about the svn-src-all mailing list