All of lore.kernel.org
 help / color / mirror / Atom feed
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);
 }

  reply	other threads:[~2008-09-25 11:07 UTC|newest]

Thread overview: 24+ 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
     [not found] <fa.aea4e10hJLpVS/qr4bumSa5e9C0@ifi.uio.no>
     [not found] ` <fa.uDmoMIWw4thxpZxpYeSIpVJhAOo@ifi.uio.no>
     [not found]   ` <fa.RIMmQqN9ybFSKBqOk9Gxi/mOeB4@ifi.uio.no>
     [not found]     ` <fa.XLGLzP+T4fm9CkeATkS1VL/Yz4Q@ifi.uio.no>
     [not found]       ` <fa.z8sKLpwDO3qQ15ZJIm152YEty4I@ifi.uio.no>
     [not found]         ` <fa.KyW7dWWjiSFnFxwdZZLurmVn8qA@ifi.uio.no>
2008-09-20 10:10           ` Reading EeePC900 battery info causes stalls (was Re: How how latent should non-preemptive scheduling be?) Sitsofe Wheeler
2008-09-20 10:25             ` Alexey Starikovskiy
2008-09-20 10:51               ` Sitsofe Wheeler
2008-09-20 10:55                 ` Reading EeePC900 battery info causes stalls Sitsofe Wheeler
2008-09-20 11:14                   ` Alexey Starikovskiy
2008-09-20 11:23                     ` Sitsofe Wheeler
2008-09-20 11:41                       ` Sitsofe Wheeler
2008-09-20 12:34                         ` Alexey Starikovskiy
2008-09-20 12:50                           ` Sitsofe Wheeler
2008-09-20 13:07                       ` Alexey Starikovskiy
2008-09-20 13:30                         ` Sitsofe Wheeler
2008-09-20 13:59             ` Reading EeePC900 battery info causes stalls (was Re: How how latent should non-preemptive scheduling be?) Steven Rostedt
2008-09-20 14:11               ` Sitsofe Wheeler
2008-09-20 14:37                 ` Steven Rostedt
2008-09-20 17:16                   ` Reading EeePC900 battery info causes stalls Sitsofe Wheeler
2008-09-20 21:53                     ` Steven Rostedt
2008-09-20 23:18                       ` Sitsofe Wheeler
2008-09-21  7:09                         ` Ingo Molnar
2008-09-22  6:24                       ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.