From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:32:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1CFB1065672; Mon, 18 Apr 2011 19:32:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8908B8FC13; Mon, 18 Apr 2011 19:32:19 +0000 (UTC) Received: by bwz12 with SMTP id 12so5646502bwz.13 for ; Mon, 18 Apr 2011 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=NmRMQYUyPhglFqsDlbsRySMvoC/d9COQ90sS0V2xYFE=; b=Vyr3Yi/CV9SO3qjlgb717iOTOfSqsfSz7DN+5dsBzblg5n9ZllpCjpOzr8hclCP+t+ 2ACjFJg1Bwne8yhcpeAHwqndhAa0bOHCLdTOK78PfLAfakZvQHN7WseuCrnJ3GROd+b+ FNZQ10r1HwpLZBRpm4c47ce+5MuM2+Tog8DzI= 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=o6TevkoB3hk4tg9ypKIKIT2hOe242ZKx0oB1gFIfDRd8757kAincb24+5m22oueIIy 4TEiFFr5XhoU1i8OCxpXk92Y6al0ho1tqcfkvlqSu5jozCuhWAyjul3jx7Sms2ktpAb4 nDJPeEd0LuOku1xrXZOljOWUDS9wuS6QWlsSI= Received: by 10.204.189.74 with SMTP id dd10mr361706bkb.174.1303155138255; Mon, 18 Apr 2011 12:32:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id b6sm3437125bkb.10.2011.04.18.12.32.16 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 12:32:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DAC91BF.7050102@FreeBSD.org> Date: Mon, 18 Apr 2011 22:32:15 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <201104181334.p3IDYVDh073304@svn.freebsd.org> <201104181306.58172.jhb@freebsd.org> In-Reply-To: <201104181306.58172.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220777 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 19:32:20 -0000 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. 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. -- Alexander Motin