public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI/NVS: Not save NVS region for new machines to accelerate S3
@ 2014-07-18  5:55 Lan Tianyu
  2014-07-18  8:00 ` Chen, Gong
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Lan Tianyu @ 2014-07-18  5:55 UTC (permalink / raw)
  To: rjw, lenb; +Cc: Lan Tianyu, linux-acpi, linux-kernel

NVS region is saved and restored unconditionally for machines without
nvs_nosave quirk during S3. Tested some new machines and the operation
is not necessary. Saving NVS region also affects S2RAM speed. The time of
NVS saving and restoring depends on the size of NVS region and it consumes
7~10ms normally.

This patch is to make machines produced from 2012 to now not saving NVS region
to accelerate S3.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/acpi/sleep.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index b3e3cc7..896d8be 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -322,7 +322,12 @@ static struct dmi_system_id acpisleep_dmi_table[] __initdata = {
 
 static void acpi_sleep_dmi_check(void)
 {
+	int year;
+
 	dmi_check_system(acpisleep_dmi_table);
+
+	if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012)
+		acpi_nvs_nosave_s3();
 }
 
 /**
-- 
1.8.4.rc0.1.g8f6a3e5.dirty


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-23  6:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18  5:55 [PATCH] ACPI/NVS: Not save NVS region for new machines to accelerate S3 Lan Tianyu
2014-07-18  8:00 ` Chen, Gong
2014-07-21  2:14   ` Lan Tianyu
2014-07-21  5:01     ` Chen, Gong
2014-07-21  5:54       ` Lan Tianyu
2014-07-21  6:25         ` Chen, Gong
2014-07-21  7:37           ` Lan Tianyu
2014-07-22 23:40 ` Rafael J. Wysocki
2014-07-23  5:35   ` Lan Tianyu
2014-07-23  6:42 ` [PATCH V2] ACPI/NVS: Not save NVS region for new machine " Lan Tianyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox