[PATCH] ata: enable ata port async suspend

From: Lin Ming
Date: Mon Jan 16 2012 - 00:09:02 EST


This saves devices suspend/resume time.

Tested system suspend/resume with SATA IDE/AHCI mode 3 times.
Below is the time took for devices suspend/resume.

SATA mode vanilla-kernel patched-kernel
--------- --------------------- ---------------------
IDE suspend: 0.744 suspend: 0.432
(0.716, 0.768, 0.748) (0.440, 0.428, 0.428)

resume: 5.084 resume: 2.209
(5.100, 5.064, 5.088) (2.168, 2.232, 2.228)

AHCI: suspend: 0.725 suspend: 0.449
(0.740, 0.708, 0.728) (0.456, 0.448, 0.444)

resume: 2.556 resume: 1.896
(2.604, 2.492, 2.572) (1.932, 1.872, 1.884)

Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
---
drivers/ata/libata-transport.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index 9a7f0ea..74aaee3 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -291,6 +291,7 @@ int ata_tport_add(struct device *parent,
goto tport_err;
}

+ device_enable_async_suspend(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);

--
1.7.2.5



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/