From owner-freebsd-current@FreeBSD.ORG Thu Oct 16 10:06:25 2008 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 0F8761065687; Thu, 16 Oct 2008 10:06:25 +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 0FBE28FC1F; Thu, 16 Oct 2008 10:06:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 225200459; Thu, 16 Oct 2008 13:06:19 +0300 Message-ID: <48F7121A.2010307@FreeBSD.org> Date: Thu, 16 Oct 2008 13:06:18 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Stanislav Sedov References: <1223284984.00022179.1223272802@10.7.7.3> <1223497390.00023332.1223487003@10.7.7.3> <1223832181.00024566.1223819402@10.7.7.3> <1223929384.00025003.1223917802@10.7.7.3> <1224112991.00025726.1224102602@10.7.7.3> <1224123783.00025735.1224113402@10.7.7.3> In-Reply-To: <1224123783.00025735.1224113402@10.7.7.3> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, zbeeble@gmail.com, freebsd-mobile@freebsd.org, freebsd-current@freebsd.org Subject: Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements 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: Thu, 16 Oct 2008 10:06:25 -0000 Stanislav Sedov wrote: > On Wed, 15 Oct 2008 23:25:11 +0300 > Alexander Motin mentioned: >> Completely fortunate I have noticed that number of iterations depends on >> my laptop power source. After small investigation I have found that it >> actually depends on dev.cpu.0.freq value. With default value 2400 I have >> only several iterations. But every double frequency decrease doubles >> iteration count. With minimum value 100MHz I have more then 100 >> iterations. Same time it doesn't looks like this time is a real wall >> time. It looks like DELAY() used in a loop has some problems with time >> counting. > > What do you mean? DELAY(9) on your laptop doesn't correspond to the > real time? Yes. It works fine when laptop operates at full frequency, but proportionally reduces time interval when powerd drops frequency down. I have also evidence about the same problem on another laptop with 7.1-PRERELEASE. > AFAIK, DELAY(9) relies on current timecounter for time > accountiong, so there might be problems with it. Have you tried > switching the kern.timecounter.hardware sysctl to see if it will > affect results? It was late and I am not very aware in FreeBSD time counting, so I have not tried to investigate it deeper. -- Alexander Motin