From: Bernard Blackham <bernard@blackham.com.au>
To: Pavel Machek <pavel@suse.cz>
Cc: acpi-devel@lists.sourceforge.net, suspend2-devel@lists.suspend2.net
Subject: Re: [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops
Date: Sun, 6 Mar 2005 04:35:33 +0800 [thread overview]
Message-ID: <20050305203533.GI4042@blackham.com.au> (raw)
In-Reply-To: <20050305175640.GL3485@openzaurus.ucw.cz>
[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]
On Sat, Mar 05, 2005 at 06:56:41PM +0100, Pavel Machek wrote:
> > After more investigation, it seems that the issue is the GPE is
> > fired but not serviced because kacpid is frozen. This in itself
> > would be okay, however, the GPE isn't being disabled before the
> > method executes (despite there being code there to do so), and hence
> > fires continuously.
>
> Perhaps you should fix that, too? It is going to cause ugly
> perfrmance problems.
Yep, been looking into it, and I think I've got it. The GPE in
question is fired periodically, about every 5 seconds. It fires when
suspending but kacpid is stopped, so the GPE is simply disabled and
never serviced. However, the state of it being disabled is recorded
in the atomic copy.
Upon resume, after restoring the atomic copy, the code at the top of
acpi_ev_disable_gpe believes that the GPE is already disabled (as it
was when we suspended) even though it's not. Hardware state is out
of sync with what the kernel thinks and badness ensues. The culprit
difference between 2.6.8 and 2.6.9-rc1 is that 2.6.8 disabled the
GPE unconditionally, 2.6.9-rc1 checks against its last known state
which is incorrect upon resuming.
Removing the check resolves this issue (patch attached). Is this an
adequate fix?
> Looks good to me. It is good idea for other reasons, too: like
> we'll be able to fight overheat during writing pages.
Fair enough. Even with kacpid running, we may still potentially run
into the same issue if a GPE occurs at the instant prior to the
atomic copy (and gets disabled in the atomic copy).
So, combining this patch with the previous kacpid NOFREEZE patch...
Does this make people happy? :) (And should it be submitted via Len
or akpm?)
Bernard.
--
Bernard Blackham <bernard at blackham dot com dot au>
[-- Attachment #2: toshiba-acpi-hack-3.diff --]
[-- Type: text/plain, Size: 461 bytes --]
--- linux-2.6.9-rc1/drivers/acpi/events/evgpe.c.orig 2005-03-06 04:29:40.000000000 +0800
+++ linux-2.6.9-rc1/drivers/acpi/events/evgpe.c 2005-03-06 04:29:49.000000000 +0800
@@ -253,10 +253,6 @@
ACPI_FUNCTION_TRACE ("ev_disable_gpe");
- if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
- return_ACPI_STATUS (AE_OK);
- }
-
/* Make sure HW enable masks are updated */
status = acpi_ev_update_gpe_enable_masks (gpe_event_info, ACPI_GPE_DISABLE);
[-- Attachment #3: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Suspend2-devel mailing list
Suspend2-devel@lists.suspend2.net
http://lists.suspend2.net/mailman/listinfo/suspend2-devel
next prev parent reply other threads:[~2005-03-05 20:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050304175058.GA4042@blackham.com.au>
[not found] ` <1110012298.6028.10.camel@DustPuppy.LNX.RO>
[not found] ` <1110012298.6028.10.camel-NCEiQXzLmfTIN9oMcCV+pg@public.gmane.org>
2005-03-05 10:02 ` [Suspend2-devel] Cause of Suspend2 resume failures on Toshiba laptops Bernard Blackham
[not found] ` <20050305100254.GH4042@blackham.com.au>
[not found] ` <20050305100254.GH4042-4vSAtV5O1nc0n/F98K4Iww@public.gmane.org>
2005-03-05 12:21 ` Dumitru Ciobarcianu
2005-03-05 17:56 ` Pavel Machek
2005-03-05 20:35 ` Bernard Blackham [this message]
2005-03-06 12:33 ` [ACPI] " Pavel Machek
[not found] ` <20050305203533.GI4042-4vSAtV5O1nc0n/F98K4Iww@public.gmane.org>
2005-03-07 16:48 ` Re: [Suspend2-devel] " John M Flinchbaugh
2005-03-07 16:54 ` [ACPI] " Bernard Blackham
2005-03-08 3:25 Re: [Suspend2-devel] " Li, Shaohua
2005-03-08 5:28 ` [ACPI] " Nigel Cunningham
2005-03-08 6:12 ` Li Shaohua
2005-03-08 6:55 ` Nigel Cunningham
-- strict thread matches above, loose matches on Subject: below --
2005-03-08 6:58 Li, Shaohua
2005-03-08 9:47 ` Bernard Blackham
2005-03-08 7:24 Li, Shaohua
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=20050305203533.GI4042@blackham.com.au \
--to=bernard@blackham.com.au \
--cc=acpi-devel@lists.sourceforge.net \
--cc=pavel@suse.cz \
--cc=suspend2-devel@lists.suspend2.net \
/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