TSC instead of ACPI: powerd doesn't work anymore (to be expected?)

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Oct 31 13:48:24 PST 2005


In message <81484.1130756628 at critter.freebsd.dk>, "Poul-Henning Kamp" writes:

>And finally, WinTel know that the ACPI timer sucks, thats why more
>recent hardware has HPET timers, I'm working on support for that.

OK, I've added a rudimentary HPET support that gives us a timecounter.

It has quality -200, so it will not be used unless manually configured
with the sysctl.


Here is the short summary of the two machines I could test it on:

		TSC		ACPI-fast	HPET		i8254
dual Xeon:	580 nsec	1429 nsec	1120 nsec	3980 nsec
dual Opteron:	212 nsec	1270 nsec	1760 nsec	4420 nsec

So while AMD is better at TSC and ACPI-fast, Intel is better at
HPET and i8254.

And yes, this probably depends on just about everything on the motherboard
so your mileage will vary...

Fortunately we can choose timecounter based on its speed, once we have
convinced ourselves that the quality is OK.  We don't currently do this,
but the code can be resurrected.

Poul-Henning


Full results (HEX = Opteron, Y = Xeon)

critter phk> ministat HEX/*.[AHT]* Y/*.[AHT]*
x HEX/_.tc.ACPI-fast
+ HEX/_.tc.HPET
* HEX/_.tc.TSC
% Y/_.tc.ACPI-fast
# Y/_.tc.HPET
@ Y/_.tc.TSC
+--------------------------------------------------------------------------+
|                 @                        #             %                 |
|                 @                        #             %                 |
|                 @                        #             %                 |
|*                @                        #             %                 |
|*                @                        #      x      %              +  |
|*                @                        #      x      %              +  |
|*                @                        #      x      %              +  |
|*                @                        #      x      %              ++ |
|**               @                        #     xxx     %              ++ |
|***              @                        #     xxx     %              +++|
|MA               A                        A     |A|     A              MA |
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10     1.257e-06     1.299e-06     1.265e-06    1.2705e-06 1.5042532e-08
+  10     1.752e-06     1.794e-06      1.76e-06    1.7637e-06 1.2543701e-08
Difference at 95.0% confidence
        4.932e-07 +/- 1.3013e-08
        38.8194% +/- 1.02424%
        (Student's t, pooled s = 1.38496e-08)
*  10      2.11e-07      2.45e-07      2.12e-07     2.189e-07 1.1551335e-08
Difference at 95.0% confidence
        -1.0516e-06 +/- 1.26009e-08
        -82.7706% +/- 0.99181%
        (Student's t, pooled s = 1.3411e-08)
%  10     1.429e-06     1.431e-06     1.429e-06    1.4295e-06 8.4983659e-10
Difference at 95.0% confidence
        1.59e-07 +/- 1.00101e-08
        12.5148% +/- 0.787888%
        (Student's t, pooled s = 1.06536e-08)
#  10      1.12e-06     1.121e-06      1.12e-06    1.1201e-06 3.1622777e-10
Difference at 95.0% confidence
        -1.504e-07 +/- 9.99638e-09
        -11.8379% +/- 0.786807%
        (Student's t, pooled s = 1.0639e-08)
@  10      5.79e-07       5.8e-07       5.8e-07     5.796e-07 5.1639778e-10
Difference at 95.0% confidence
        -6.909e-07 +/- 1.00001e-08
        -54.3802% +/- 0.787097%
        (Student's t, pooled s = 1.06429e-08)

critter phk> ministat HEX/*
x HEX/_.tc.ACPI-fast
+ HEX/_.tc.HPET
* HEX/_.tc.TSC
% HEX/_.tc.i8254
+--------------------------------------------------------------------------+
|                                                                         %|
|*                          +                                             %|
|*                 x        +                                             %|
|*                 x        +                                             %|
|*                 x        +                                             %|
|*                 x        +                                             %|
|*                 x        +                                             %|
|*                 x        +                                             %|
|*                 xx       +                                             %|
|**                xx       +                                             %|
|A                 A|       A                                             A|
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10     1.257e-06     1.299e-06     1.265e-06    1.2705e-06 1.5042532e-08
+  10     1.752e-06     1.794e-06      1.76e-06    1.7637e-06 1.2543701e-08
Difference at 95.0% confidence
        4.932e-07 +/- 1.3013e-08
        38.8194% +/- 1.02424%
        (Student's t, pooled s = 1.38496e-08)
*  10      2.11e-07      2.45e-07      2.12e-07     2.189e-07 1.1551335e-08
Difference at 95.0% confidence
        -1.0516e-06 +/- 1.26009e-08
        -82.7706% +/- 0.99181%
        (Student's t, pooled s = 1.3411e-08)
%  10     4.418e-06     4.439e-06     4.424e-06    4.4264e-06 7.5894664e-09
Difference at 95.0% confidence
        3.1559e-06 +/- 1.11942e-08
        248.398% +/- 0.881084%
        (Student's t, pooled s = 1.19138e-08)

critter phk> ministat Y/*
x Y/_.tc.ACPI-fast
+ Y/_.tc.HPET
* Y/_.tc.TSC
% Y/_.tc.i8254
+--------------------------------------------------------------------------+
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|*           +     x                                                      %|
|A           A     A                                                      A|
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10     1.429e-06     1.431e-06     1.429e-06    1.4295e-06 8.4983659e-10
+  10      1.12e-06     1.121e-06      1.12e-06    1.1201e-06 3.1622777e-10
Difference at 95.0% confidence
        -3.094e-07 +/- 6.0245e-10
        -21.6439% +/- 0.0421441%
        (Student's t, pooled s = 6.41179e-10)
*  10      5.79e-07       5.8e-07       5.8e-07     5.796e-07 5.1639778e-10
Difference at 95.0% confidence
        -8.499e-07 +/- 6.60693e-10
        -59.4544% +/- 0.0462185%
        (Student's t, pooled s = 7.03167e-10)
%  10     3.973e-06     3.986e-06      3.98e-06    3.9791e-06 3.4140234e-09
Difference at 95.0% confidence
        2.5496e-06 +/- 2.33748e-09
        178.356% +/- 0.163517%
        (Student's t, pooled s = 2.48775e-09)



-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list