login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
3
Re: [RFC PATCH] AHCI: speed up resume
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Rafael J. Wysocki <rjw@...>
To: Zhang Rui <rui.zhang@...>
Cc: linux-pm <linux-pm@...>, linux-kernel <linux-kernel@...>, <tj@...>
Subject:
Re: [RFC PATCH] AHCI: speed up resume
Date: Thursday, July 3, 2008 - 7:23 pm
On Thursday, 3 of July 2008, Zhang Rui wrote:
quoted text
> During S3 resume, AHCI driver sleeps 1 second to wait for the HBA reset > to finish. This is luxurious, :) > > According to the AHCI 1.2 spec, We should poll the HOST_CTL register, > and return error if the host reset is not finished within 1 second. > > Test results show that the HBA reset can be done quickly(in usecs). > And this patch may save nearly 1 second during resume.
That's a lot. How heavily has it been tested? Rafael
quoted text
> Signed-off-by: Zhang Rui <rui.zhang@intel.com> > -- > drivers/ata/ahci.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > Index: linux-2.6/drivers/ata/ahci.c > =================================================================== > --- linux-2.6.orig/drivers/ata/ahci.c 2007-05-03 11:06:33.000000000 +0800 > +++ linux-2.6/drivers/ata/ahci.c 2008-07-02 16:25:54.000000000 +0800 > @@ -1073,18 +1073,29 @@ > > /* global controller reset */ > if (!ahci_skip_host_reset) { > + int delay = msecs_to_jiffies(1000); > + int timeout; > + > tmp = readl(mmio + HOST_CTL); > if ((tmp & HOST_RESET) == 0) { > writel(tmp | HOST_RESET, mmio + HOST_CTL); > readl(mmio + HOST_CTL); /* flush */ > } > > - /* reset must complete within 1 second, or > + /* > + * to perform host reset, OS should set HOST_RESET > + * and poll until this bit is read to be "0" > + * reset must complete within 1 second, or > * the hardware should be considered fried. > */ > - ssleep(1); > + timeout = jiffies + delay; > + while (jiffies < timeout) { > + tmp = readl(mmio + HOST_CTL); > + if (!(tmp & HOST_RESET)) > + break; > + cpu_relax(); > + } > > - tmp = readl(mmio + HOST_CTL); > if (tmp & HOST_RESET) { > dev_printk(KERN_ERR, host->dev, > "controller reset failed (0x%x)\n", tmp); > > > >
-- "Premature optimization is the root of all evil." - Donald Knuth --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC PATCH] AHCI: speed up resume
, Zhang Rui
, (Thu Jul 3, 4:48 am)
Re: [RFC PATCH] AHCI: speed up resume
, Tejun Heo
, (Thu Jul 3, 10:48 pm)
Re: [RFC PATCH] AHCI: speed up resume
, Zhang Rui
, (Fri Jul 4, 1:32 am)
Re: [RFC PATCH] AHCI: speed up resume
, Jeff Garzik
, (Fri Jul 11, 9:49 am)
Re: [RFC PATCH] AHCI: speed up resume
, Tejun Heo
, (Fri Jul 4, 4:10 am)
Re: [RFC PATCH] AHCI: speed up resume
, Rafael J. Wysocki
, (Thu Jul 3, 7:23 pm)
Re: [RFC PATCH] AHCI: speed up resume
, Zhang Rui
, (Thu Jul 3, 9:48 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
[patch 02/13] syslets: add syslet.h include file, user API/ABI definitions
Heiko Carstens
Re: 2.6.25-rc6-git6: Reported regressions from 2.6.24
Greg Kroah-Hartman
[PATCH 010/196] Chinese: add translation of Codingstyle
Rafael J. Wysocki
[Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160
git
:
linux-netdev
:
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
Linus Torvalds
Re: [GIT]: Networking
Mark Lord
Re: [BUG] New Kernel Bugs
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
776 guests
online.
Online users
strcmp
Syndicate