Re: Reading EeePC900 battery info causes stalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c
index c06238e..33cd061 100644
--- a/drivers/acpi/parser/psloop.c
+++ b/drivers/acpi/parser/psloop.c
@@ -564,6 +564,8 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
  *
  ******************************************************************************/
 
+#include <linux/sched.h>
+
 static acpi_status
 acpi_ps_complete_op(struct acpi_walk_state *walk_state,
 		    union acpi_parse_object **op, acpi_status status)
@@ -719,6 +721,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
 		*op = NULL;
 	}
 
+	cond_resched();
+
 	return_ACPI_STATUS(AE_OK);
 }
 

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux