Re: incorrect ping(8) interval with powerd(8)

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Wed, 15 Jun 2005 21:24:46 -0600 (MDT)
In message: <20050615231823.GB2239_at_obiwan.tataz.chchile.org>
            Jeremie Le Hen <jeremie_at_le-hen.org> writes:
: Hi list,
: 
: as the subjects state, when powerd(8) is running and has set a lower
: frequency than the processor's natural one, interval between each
: packets are too long.  When my laptop is plugged, I told powerd(8) to
: run the processor at maximum speed (-a max).
: 
: Let's have a look at this :
: %%%
:     jarjarbinks:root# sysctl hw.acpi.acline
:     hw.acpi.acline: 1
:     jarjarbinks:root# sysctl dev.cpu.0.freq
:     dev.cpu.0.freq: 1735
:     jarjarbinks:root# time ping -qc 2 192.168.1.1
:     PING 192.168.1.1 (192.168.1.1): 56 data bytes
:     
:     --- 192.168.1.1 ping statistics ---
:     2 packets transmitted, 2 packets received, 0% packet loss
:     round-trip min/avg/max/stddev = 0.266/0.269/0.271/0.002 ms
:     
:     real    0m1.003s
:     user    0m0.001s
:     sys     0m0.001s
: 
:     jarjarbinks:root# sysctl hw.acpi.acline
:     hw.acpi.acline: 0
:     jarjarbinks:root# sysctl dev.cpu.0.freq
:     dev.cpu.0.freq: 216
:     jarjarbinks:root# time ping -qc 2 192.168.1.1
:     PING 192.168.1.1 (192.168.1.1): 56 data bytes
:     
:     --- 192.168.1.1 ping statistics ---
:     2 packets transmitted, 2 packets received, 0% packet loss
:     round-trip min/avg/max/stddev = 0.637/0.814/0.991/0.177 ms
:     
:     real    0m2.252s
:     user    0m0.004s
:     sys     0m0.021s
: %%%
: 
: I check ping(8) source code and it appears it uses select(8) to wait
: the desired amount of time.  I don't think this is the intended
: behaviour.  Where does this bug (feature?) come from ?

Those numbers look about right for a 200MHz CPU.

Warner
Received on Thu Jun 16 2005 - 01:25:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:36 UTC