From owner-freebsd-current@FreeBSD.ORG Tue Feb 27 11:36:40 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from misaki (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 76F7416A41A; Tue, 27 Feb 2007 11:36:39 +0000 (UTC) (envelope-from ariff@FreeBSD.org) Date: Tue, 27 Feb 2007 19:35:08 +0800 From: Ariff Abdullah To: Nate Lawson Message-Id: <20070227193508.49076f8b.ariff@FreeBSD.org> In-Reply-To: <45E39552.2020607@root.org> References: <45E39552.2020607@root.org> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__27_Feb_2007_19_35_08_+0800_tOmR1P62xTzvw=dN" Cc: stable@freebsd.org, current@FreeBSD.org Subject: Re: PATCH: new acpi embedded controller I/O model X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 11:36:41 -0000 --Signature=_Tue__27_Feb_2007_19_35_08_+0800_tOmR1P62xTzvw=dN Content-Type: multipart/mixed; boundary="Multipart=_Tue__27_Feb_2007_19_35_08_+0800_L+v/3CpDdCI8xHer" --Multipart=_Tue__27_Feb_2007_19_35_08_+0800_L+v/3CpDdCI8xHer Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 26 Feb 2007 18:20:02 -0800 Nate Lawson 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. >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D98171 >=20 > To use it, just recompile your acpi kernel module and load it at > boot: cd /sys/modules/acpi/acpi && make && cp acpi.ko / >=20 > Then at the loader prompt after rebooting: > > load /acpi.ko > > boot >=20 > You should be able to see battery status and thermal settings via > "sysctl hw.acpi" as normal. Check dmesg for any new errors. >=20 > If you notice slower performance or get EC "timed out" messages on > console, you try increasing these sysctls/tunables: >=20 > debug.acpi.ec.timeout > debug.acpi.ec.poll_time >=20 > Or turn off this sysctl/tunable, disabling the new burst mode: > debug.acpi.ec.burst=3D0 >=20 > To find any performance problems, you'll need to rebuild the kernel > and modules with this added to your kernel config: >=20 > options KTR > options KTR_ENTRIES=3D65536 >=20 > 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 >=20 > 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. >=20 >=20 Not quite a success, unless with debug.acpi.ec.burst=3D0 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 ........ --Multipart=_Tue__27_Feb_2007_19_35_08_+0800_L+v/3CpDdCI8xHer Content-Type: text/x-diff; name="more_ec.diff" Content-Disposition: attachment; filename="more_ec.diff" Content-Transfer-Encoding: quoted-printable --- 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 =3D ec_poll_time / EC_POLL_DELAY; if (count <=3D 0) count =3D 1; + slp_ival =3D max(hz / 1000, 1); for (i =3D 0; i < count; i++) { EcStatus =3D EC_GET_CSR(sc); if (sc->ec_burstactive && (EcStatus & EC_FLAG_BURST_MODE) =3D=3D 0) { @@ -947,7 +948,15 @@ Status =3D 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); + } } =20 /* --Multipart=_Tue__27_Feb_2007_19_35_08_+0800_L+v/3CpDdCI8xHer-- --Signature=_Tue__27_Feb_2007_19_35_08_+0800_tOmR1P62xTzvw=dN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF5Bdxlr+deMUwTNoRAu2SAKDZ1xTdN/ck0ag9CRvjwraIiV+R/gCgnCfe aRAsH17y8Gl+R5cE8QctSCo= =BsbL -----END PGP SIGNATURE----- --Signature=_Tue__27_Feb_2007_19_35_08_+0800_tOmR1P62xTzvw=dN--