public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	Len Brown <lenb@kernel.org>,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: [patch 2/2] clockevents: remove the suspend/resume workaround^Wthinko
Date: Sat, 22 Sep 2007 22:29:06 -0000	[thread overview]
Message-ID: <20070922222118.995338086@linutronix.de> (raw)
In-Reply-To: 20070922220347.586903979@linutronix.de

[-- Attachment #1: clockevents-remove-the-wrong-fix.patch --]
[-- Type: text/plain, Size: 2251 bytes --]

In a desparate attempt to fix the suspend/resume problem on Andrews
VAIO I added a workaround which enforced the broadcast of the oneshot
timer on resume. This was actually resolving the problem on the VAIO
but was just a stupid workaround, which was not tackling the root
cause: the assignement of lower idle C-States in the ACPI processor_idle
code. The cpuidle patches, which utilize the dynamic tick feature and
go faster into deeper C-states exposed the problem again. The correct
solution is the previous patch, which prevents lower C-states across
the suspend/resume.

Remove the enforcement code, including the conditional broadcast timer
arming, which helped to pamper over the real problem for quite a time.
The oneshot broadcast flag for the cpu, which runs the resume code can
never be set at the time when this code is executed. It only gets set,
when the CPU is entering a lower idle C-State.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>

---
 kernel/time/tick-broadcast.c |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

Index: linux-2.6/kernel/time/tick-broadcast.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-broadcast.c	2007-09-23 00:00:59.000000000 +0200
+++ linux-2.6/kernel/time/tick-broadcast.c	2007-09-23 00:01:00.000000000 +0200
@@ -382,23 +382,8 @@ static int tick_broadcast_set_event(ktim
 
 int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
 {
-	int cpu = smp_processor_id();
-
-	/*
-	 * If the CPU is marked for broadcast, enforce oneshot
-	 * broadcast mode. The jinxed VAIO does not resume otherwise.
-	 * No idea why it ends up in a lower C State during resume
-	 * without notifying the clock events layer.
-	 */
-	if (cpu_isset(cpu, tick_broadcast_mask))
-		cpu_set(cpu, tick_broadcast_oneshot_mask);
-
 	clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
-
-	if(!cpus_empty(tick_broadcast_oneshot_mask))
-		tick_broadcast_set_event(ktime_get(), 1);
-
-	return cpu_isset(cpu, tick_broadcast_oneshot_mask);
+	return 0;
 }
 
 /*

-- 


  parent reply	other threads:[~2007-09-22 22:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22 22:29 [patch 0/2] suspend/resume regression fixes Thomas Gleixner
2007-09-22 22:29 ` [patch 1/2] ACPI: disable lower idle C-states across suspend/resume Thomas Gleixner
2007-10-01 10:11   ` Andi Kleen
2007-09-22 22:29 ` Thomas Gleixner [this message]
2007-09-22 22:59 ` [patch 0/2] suspend/resume regression fixes Linus Torvalds
2007-09-22 23:30   ` Thomas Gleixner
2007-09-23  1:20   ` Oleg Verych
2007-09-23  3:11     ` Linus Torvalds
2007-09-23  5:24       ` Mihai Donțu
2007-09-23 12:30         ` Alan Cox
2007-09-23 13:00           ` Mihai Donțu
2007-09-23 14:06       ` Matthew Garrett
2007-09-23 10:29   ` Rafael J. Wysocki
2007-09-28 20:27   ` Mark Lord
2007-09-28 20:33     ` Thomas Gleixner
2007-09-28 21:17       ` Mark Lord
2007-09-28 21:40         ` Rafael J. Wysocki
2007-09-28 21:04     ` Alan Cox
2007-09-29 17:12     ` Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070922222118.995338086@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=torvalds@osdl.org \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox