Re: disabled CST_CNT write

2012-07-10 Thread Andriy Gapon
on 08/07/2012 19:49 Nate Lawson said the following:
 On Jul 8, 2012, at 2:11 AM, Andriy Gapon wrote:
 
 acpi_cpu.c has a block of code to write CST_CNT to SMI_CMD, but the block is
 under #ifdef notyet.  It seems that the code was added that many years ago 
 and
 never enabled.
 Now, judging from the reports I've seen on this mailing list, it appears that
 _CST changes do happen and the driver seem to handle them sufficiently well.
 I think that a lot of modern platforms do not even provide CST_CNT and assume
 that an OS is able to handle C-state change notifications.
 So, I guess that it should be safe to enable the code in question now.

 Could anyone with a FreeBSD laptop and non-zero CST_CNT in FADT please test 
 this?
 
 It was only under an #ifdef because at the time our CST implementation 
 couldn't handle CST changes cleanly. I had added some support for it, but 
 since it couldn't be tested, I wasn't sure how actual hardware would behave.
 
 I think it's fine to enable now. I think 2007-era Thinkpads were some of the 
 first to add this feature.

Nate,

thank you for the information/explanation.

-- 
Andriy Gapon


___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: improve cx_lowest logic

2012-07-10 Thread Ian Smith
On Sun, 8 Jul 2012 13:22:49 +0300, Andriy Gapon wrote:

  I would like to propose the following change for review and testing:
  http://people.freebsd.org/~avg/acpi_cpu_cx_lowest.diff
  
  The idea is to separate effective cx_lowest (the limit that the idling code
  should not currently exceed) from user-set cx_lowest limit/target.
  Specifically, this addresses dynamic C-state changes by ACPI platform.
  Currently if a user sets cx_lowest to, say, C3, then available C-states 
  change
  so that C2 is the deepest available C-state and cx_lowest gets overridden to 
  C2
  and all memory of C3 setting is lost.

I wonder if that explains why setting C3 on aforesaid T23 has no effect 
(in terms of dev.cpu.0.cx_usage indicating any time spent in C3) unless 
the machine happened to be booted up on battery, in which case C3 is 
shown as working whenever its enabled, by power_profile or manually?

Would I be wasting my time or yours trying this on an 8.2-R kernel?  Or 
are there other major changes that probably preclude this?  The patch 
applies cleanly, but the offsets look a bit daunting:

smithi on t23% patch  acpi_cpu_cx_lowest.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
|index e2a3dbf..e7ca14d 100644
|--- a/sys/dev/acpica/acpi_cpu.c
|+++ b/sys/dev/acpica/acpi_cpu.c
--
Patching file acpi_cpu.c using Plan A...
Hunk #1 succeeded at 86 (offset -3 lines).
Hunk #2 succeeded at 132 (offset -7 lines).
Hunk #3 succeeded at 170 (offset -3 lines).
Hunk #4 succeeded at 548 (offset -42 lines).
Hunk #5 succeeded at 792 (offset -29 lines).
Hunk #6 succeeded at 787 (offset -42 lines).
Hunk #7 succeeded at 812 (offset -29 lines).
Hunk #8 succeeded at 817 (offset -42 lines).
Hunk #9 succeeded at 1013 (offset -31 lines).
Hunk #10 succeeded at 1010 (offset -42 lines).
Hunk #11 succeeded at 1150 (offset -31 lines).
Hunk #12 succeeded at 1168 (offset -42 lines).
Hunk #13 succeeded at 1208 (offset -31 lines).
done

I hope to get another machine going soon on which I can play with 
9-stable, maybe 10, but meanwhile this one is bread and butter ..

cheers, Ian
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: improve cx_lowest logic

2012-07-10 Thread Sean Bruno
On Sun, 2012-07-08 at 03:22 -0700, Andriy Gapon wrote: 
 I would like to propose the following change for review and testing:
 http://people.freebsd.org/~avg/acpi_cpu_cx_lowest.diff

Very nice.  After a review I went ahead and applied it for testing.  All
seems to be well on battery and A/C on my T520 so I'm very happy to see
this go into the tree.

Let me know if you want me to do the man page update for acpi_cpu(4) 

Sean 

___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: improve cx_lowest logic

2012-07-10 Thread Sean Bruno
On Tue, 2012-07-10 at 07:27 -0700, Ian Smith wrote:
 I wonder if that explains why setting C3 on aforesaid T23 has no
 effect 
 (in terms of dev.cpu.0.cx_usage indicating any time spent in C3)
 unless 
 the machine happened to be booted up on battery, in which case C3 is 
 shown as working whenever its enabled, by power_profile or manually?
 
 

silly question, did you set these in /etc/rc.conf ??

performance_cx_lowest=LOW
economy_cx_lowest=LOW

Sean

___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org