Re: PATCH: new acpi embedded controller I/O model



On Mon, 26 Feb 2007 18:20:02 -0800
Nate Lawson <nate@xxxxxxxx> wrote:
If you are having EC timeout problems as in the below PR, please try
the latest EC code. I just committed it in rev 1.69 of acpi_ec.c to
-current. Attached is the patch for 6-stable.

http://www.freebsd.org/cgi/query-pr.cgi?pr=98171

To use it, just recompile your acpi kernel module and load it at
boot: cd /sys/modules/acpi/acpi && make && cp acpi.ko /

Then at the loader prompt after rebooting:
load /acpi.ko
boot

You should be able to see battery status and thermal settings via
"sysctl hw.acpi" as normal. Check dmesg for any new errors.

If you notice slower performance or get EC "timed out" messages on
console, you try increasing these sysctls/tunables:

debug.acpi.ec.timeout
debug.acpi.ec.poll_time

Or turn off this sysctl/tunable, disabling the new burst mode:
debug.acpi.ec.burst=0

To find any performance problems, you'll need to rebuild the kernel
and modules with this added to your kernel config:

options KTR
options KTR_ENTRIES=65536

Then reboot, load this kernel/acpi.ko, use the system for a while to
trigger the problem behavior and generate output:
ktrdump -t | gzip -c > ktr.out.gz

This code is pretty well-tested so I expect the only issues we might
see is it not totally fixing some systems that previously didn't
work or needing to add some workaround code for systems that don't
properly support burst mode.



Not quite a success, unless with debug.acpi.ec.burst=0 plus this
additional patch. Even so, the timed out message keep appearing once
in a while though not so frequent as before. In terms of performance,
things are a bit smoother (acpiconf -i 0 works, no longer exhibit
delay or producing timed out messages). Tuning
debug.acpi.ec.timeout/poll_timeout upside-down has no real effect on
eliminating those timed out messages.

Compaq V3000/Turion64 X2.


--
Ariff Abdullah
FreeBSD

... Recording in stereo is obviously too advanced
and confusing for us idiot ***** users :P ........
--- sys/dev/acpica/acpi_ec.c Tue Feb 27 19:21:12 2007
+++ sys/dev/acpica/acpi_ec.c Tue Feb 27 19:22:17 2007
@@ -936,6 +936,7 @@
count = ec_poll_time / EC_POLL_DELAY;
if (count <= 0)
count = 1;
+ slp_ival = max(hz / 1000, 1);
for (i = 0; i < count; i++) {
EcStatus = EC_GET_CSR(sc);
if (sc->ec_burstactive && (EcStatus & EC_FLAG_BURST_MODE) == 0) {
@@ -947,7 +948,15 @@
Status = AE_OK;
break;
}
- AcpiOsStall(EC_POLL_DELAY);
+ if (sc->ec_burstactive)
+ AcpiOsStall(EC_POLL_DELAY);
+ else {
+ if (!cold)
+ msleep(&sc->ec_csrvalue, &sc->ec_mtx, PZERO, "ecpoll",
+ slp_ival);
+ else
+ AcpiOsStall(1000);
+ }
}

/*

Attachment: pgpFhciC56rYw.pgp
Description: PGP signature



Relevant Pages

  • Re: PATCH: new acpi embedded controller I/O model
    ... Attached is the patch for 6-stable. ... "sysctl hw.acpi" as normal. ... you'll need to rebuild the kernel ... options KTR ...
    (freebsd-current)
  • Re: Automatic Configuration of a Kernel
    ... This patch is pointless without other kernel magic to guarantee that ... Guess it's time to re-post my sysctl patch to provide a general-purpose ... the size of the user buffer ...
    (Linux-Kernel)
  • Re: HEADS-UP: starting to commit linuxolator (SoC 2006) changes...
    ... I thought about this before deciding to commit it. ... they patch. ... sysctl and they can test. ... I'm running a kernel with this changes here and since I didn't enabled ...
    (freebsd-current)
  • Re: RT patch acceptance
    ... judge the complexity of a design for that type of system. ... claim that you cannot judge the complexity of a kernel modification. ... Since the patch in question doesn't actually need that information to ... nanokernel's API up to date with additions to Linux's API that RT people ...
    (Linux-Kernel)
  • [RFC] Making percpu module variables have their own memory.
    ... Someone using the -rt patch found that one of the tracing options caused ... 64K for every CPU to cover all the per_cpu variables used in the kernel ... static void wakeup_softirqd_prio ...
    (Linux-Kernel)