From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>, Andi Kleen <andi@firstfloor.org>,
linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: Re: patch for bugs 9998 and 10724
Date: Wed, 10 Sep 2008 06:23:20 +0400 [thread overview]
Message-ID: <48C72F98.5040904@suse.de> (raw)
In-Reply-To: <1221009313.3989.114.camel@yakui_zhao.sh.intel.com>
Zhao Yakui wrote:
> On Tue, 2008-09-09 at 13:36 +0400, Alexey Starikovskiy wrote:
>> Zhao Yakui wrote:
>>> On Tue, 2008-09-09 at 13:12 +0400, Alexey Starikovskiy wrote:
>>>> Zhao Yakui wrote:
>>>>> Hi, Alexey
>>>>> You attached the updated patch on the bug 10724/9998.
>>>>> Can the following situation be handled by your patch?(For example:
>>>>> bug 10724)
>>>>> EC GPE Interrupt storm is detected and EC GPE will be disabled
>>>>> when doing EC transaction.
>>>>> If EC notification event happens while doing EC transaction(EC
>>>>> GPE is disabled), the SCI_EVT bit of EC status register is cleared
>>>>> automatically before we can handle it.
>>>> SCI_EVT is cleared only as a response to query command sent to EC, there is no
>>>> timeout on it.
>>> If the SCI_EVT is cleared only after issuing query the command, in
>>> theory the poll timer should also handle it. But on the laptop of bug
>>> 10724 it seems that the poll timer can't handle such notification event.
>>> And on the laptops of bug 11428 and 8459 the poll timer can't handle the
>>> notification event when the system is switched from GPE mode to polling
>>> mode.
> What we cared only is whether the EC notification event can be detected
> by OS when the following case happens? (For example: On the laptop of
> bug 10724)
> EC GPE Interrupt storm is detected and EC GPE will be disabled when
> doing EC transaction.
> If EC notification event happens while doing EC transaction(EC GPE
> is disabled), the SCI_EVT bit of EC status register is cleared before we
> can handle it.
In such case, event is lost.
>
>> The problem here is with auto-repeat of function keys, thus the need to _distinguish_
>> one event from another (SCI bit will be set, just the event will be either different
>> or next of the same kind). Poll timer does it's job every 500ms, thus auto-repeated keys are
>> lost. With the fastest auto-repeat being 30/s or 33ms we have plenty of time.
>>>> Transaction will take at most 2 ms (1 write/1 read or 2 writes in poll mode),
>>>> and at the end of the transaction there is a check of the SCI bit.
>>>> With the un-patched EC SCI bit needs to stay for period while the QUERY_PENDING bit is set,
>>>> which could be quite more than 2 ms, and it seems to comply with that even on most broken
>>>> hardware.
>>>>> Can the EC notification event be handled by OS?
>>> Maybe it will take very short time to do the EC transaction. Myabe in
>>> most cases it is about 2ms. But in some worse situation it will take a
>>> long time(For example: 100ms). If the EC notification happens in such
>>> case, how to handle the event? (the SCI_EVT bit will be cleared before
>>> we can detect it).
>> Where do you get this 100ms number?
> As I state in the previous email, the msleep is realized by the function
> of schedule_timeout. The input parameter of msleep will be translated to
> jiffies unit. In such case the time of EC transaction will be related
> with the definition of HZ.(If the HZ is 100, msleep(1) will cost
> 10ms).At the same time when one process is waked up, maybe it won't be
> scheduled immediately. If so, the time of EC transaction will be
> longer.Maybe in some worse case the time will exceed 500ms.
> The detailed info log can be found in
> http://bugzilla.kernel.org/show_bug.cgi?id=11141
>
>
Ok.
next prev parent reply other threads:[~2008-09-10 2:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 5:57 [PATCH] ACPI : Avoid bogus timeout about SMbus check Zhao Yakui
2008-09-04 12:18 ` Andi Kleen
2008-09-04 12:33 ` patch for bugs 9998 and 10724 Alexey Starikovskiy
2008-09-04 12:35 ` Alexey Starikovskiy
2008-09-04 13:18 ` Andi Kleen
2008-09-05 2:26 ` Zhang Rui
2008-09-05 3:49 ` Zhao Yakui
2008-09-05 12:58 ` Alexey Starikovskiy
2008-09-08 1:18 ` Zhao Yakui
2008-09-05 12:45 ` Alexey Starikovskiy
2008-09-08 2:56 ` Zhang Rui
2008-09-08 8:25 ` Alexey Starikovskiy
2008-09-09 9:13 ` Zhao Yakui
2008-09-09 9:12 ` Alexey Starikovskiy
2008-09-09 9:28 ` Alexey Starikovskiy
2008-09-09 9:43 ` Zhao Yakui
2008-09-09 9:36 ` Alexey Starikovskiy
2008-09-10 1:15 ` Zhao Yakui
2008-09-10 2:23 ` Alexey Starikovskiy [this message]
2008-09-11 19:49 ` [PATCH] ACPI : Avoid bogus timeout about SMbus check Oldrich Jedlicka
2008-09-11 21:13 ` Alexey Starikovskiy
2008-09-14 20:06 ` Oldrich Jedlicka
2008-09-12 1:38 ` Zhao Yakui
2008-09-14 20:17 ` Oldrich Jedlicka
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=48C72F98.5040904@suse.de \
--to=astarikovskiy@suse.de \
--cc=andi@firstfloor.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=yakui.zhao@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;
as well as URLs for NNTP newsgroup(s).