From: Alexey Starikovskiy <aystarik@gmail.com>
To: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: Reading EeePC900 battery info causes stalls
Date: Thu, 25 Sep 2008 15:07:54 +0400 [thread overview]
Message-ID: <48DB710A.2060206@gmail.com> (raw)
In-Reply-To: <48DB5FEE.4000404@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
Alexey Starikovskiy wrote:
> Sitsofe Wheeler wrote:
>> Hi Alexey,
>>
>> Alexey Starikovskiy wrote:
>>> I think the least troubling place to add cond_resched() is then
>>> ACPICA is exiting interpreter.
>>> Please check if the attached patch helps with latencies.
>>
>> There was no real change (latency was still bad). If you look at the
>> trace (before your patch) on
>> http://sucs.org/~sits/test/eeepc-debug/20080923/latency_trace.gz
>> (700kbyte compressed, 15Mbytes uncompressed) you can see that
>> acpi_ex_exit_interpreter is only called once near the end of the trace:
>>
>> cat-5901 0.N.. 270496us : acpi_ex_exit_interpreter
>> (acpi_ev_address_space_dispatch)
>>
>> By then the time had already been racked up...
>>
> Ok, let's add it to the end of acpi_ps_complete_op() then... They
> appear every 100usec or so...
>
acpi_ps_parse_aml() is called not so often (~10000usec), so maybe it is
a "sweet spot"
[-- Attachment #2: add_cond_resched_to_ACPI.patch --]
[-- Type: text/x-diff, Size: 742 bytes --]
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 15e1702..ceab67c 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -439,6 +439,8 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
*
******************************************************************************/
+#include <linux/sched.h>
+
acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
{
acpi_status status;
@@ -688,5 +690,6 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
acpi_ut_delete_generic_state(ACPI_CAST_PTR
(union acpi_generic_state, thread));
acpi_gbl_current_walk_list = prev_walk_list;
+ cond_resched();
return_ACPI_STATUS(status);
}
next prev parent reply other threads:[~2008-09-25 11:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 17:52 Reading EeePC900 battery info causes stalls Sitsofe Wheeler
2008-09-25 8:47 ` Alexey Starikovskiy
2008-09-25 9:35 ` Sitsofe Wheeler
2008-09-25 9:36 ` Sitsofe Wheeler
2008-09-25 9:54 ` Alexey Starikovskiy
2008-09-25 11:07 ` Alexey Starikovskiy [this message]
2008-09-25 11:56 ` Sitsofe Wheeler
2008-09-25 12:01 ` Alexey Starikovskiy
2008-09-25 14:57 ` Alexey Starikovskiy
2008-09-25 17:30 ` Sitsofe Wheeler
2008-09-25 11:17 ` Sitsofe Wheeler
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=48DB710A.2060206@gmail.com \
--to=aystarik@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=sitsofe@yahoo.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).