From: Andi Kleen <ak-l3A5Bk7waGM@public.gmane.org>
To: "Yu, Luming" <luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Andi Kleen <ak-l3A5Bk7waGM@public.gmane.org>,
Matthew Wilcox <matthew-Ztpu424NOJ8@public.gmane.org>,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
"Fu,
Michael" <michael.fu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Brown, Len" <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Moore,
Robert" <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] Don't disable interrupts during EC access
Date: Tue, 16 Nov 2004 16:37:10 +0100 [thread overview]
Message-ID: <20041116153709.GA2392@wotan.suse.de> (raw)
In-Reply-To: <3ACA40606221794F80A5670F0AF15F84041AC082@pdsmsx403>
On Tue, Nov 16, 2004 at 11:21:03PM +0800, Yu, Luming wrote:
> It is just due to odd hardware behavior. :-)
> For example, if you want to read data from EC. The first step
> is writing 0x80 (read command) to ec command register.
> Then, if EC (hardware) write data into the output buffer, the
> output buffer flag (OBF) in the status register is set.
> (I assume it is within 1ms). According to ACPI spec,
> now, EC interrupt will get triggered. And this is
> firmware generated edge interrupt. It will hold until OBF get reset.
> When the host processor reads this data from the output buffer,
> the OBF can be reset.
>
> So, if you remove the spin_lock_irqsave, when OBF is set
> you could get interrupt storm.
>
> For detail, please refer to ACPI spec :
> 12 ACPI Embedded Controller Interface Specification.
Ok. But the problem is not the actual write, but the waiting
for the event which takes extremly long on these machines
(it's not a single broken machine, but has been observed
on several VIA based laptops). Would it work to only disable
interrupts during the register write/read, but not during the
polling delay?
Another possible way would be to only disable the ACPI interrupt
in the local APIC and keep the others alive (but what to do in PIC mode?)
>
> >
> >And the event polling can take several ms, there is just no way
> >to do this during runtime with interrupts off. Especially since
> >thermal will do this every few seconds. With my patch at least
> >only kacpid is blocked for that long, not the whole system.
> >
> >-Andi
> >
>
> As for thermal event, AFAIK, not all laptops use EC to generate thermal
> event. And I'm thinking of a algorithm.
A better algorithm to do this would be fine, but even if you do
the EC access only very infrequent it's imho still not really
appropiate to lose timer interrupts and create long scheduling bubbles
durign this. So some solution for the broken EC reads needs to be found even
independent from the thermal algorithm.
-Andi
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
next prev parent reply other threads:[~2004-11-16 15:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 15:21 [PATCH] Don't disable interrupts during EC access Yu, Luming
2004-11-16 15:37 ` Andi Kleen [this message]
[not found] ` <20041116153709.GA2392-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2004-11-17 6:55 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2004-11-17 7:46 Yu, Luming
2004-11-17 8:02 ` Dmitry Torokhov
[not found] ` <200411170302.58634.dtor_core-yWtbtysYrB+LZ21kGMrzwg@public.gmane.org>
2004-11-17 21:53 ` Len Brown
2004-11-18 6:14 ` Dmitry Torokhov
2004-11-17 7:10 Li, Shaohua
[not found] ` <16A54BF5D6E14E4D916CE26C9AD305758EF9BD-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-11-17 7:58 ` Dmitry Torokhov
2004-11-17 6:12 Yu, Luming
2004-11-16 15:41 Yu, Luming
2004-11-16 6:15 Yu, Luming
2004-11-16 12:16 ` Matthew Wilcox
[not found] ` <20041116121616.GG1108-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2004-11-16 12:29 ` Andi Kleen
[not found] ` <20041116122946.GG28839-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2004-11-17 1:25 ` Stefan Seyfried
2004-11-15 22:56 Andi Kleen
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=20041116153709.GA2392@wotan.suse.de \
--to=ak-l3a5bk7wagm@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=matthew-Ztpu424NOJ8@public.gmane.org \
--cc=michael.fu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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