[PATCH] ntpd: don't stay at short polling interval
Denys Vlasenko
vda.linux at googlemail.com
Sun Jan 4 17:12:41 UTC 2015
Sorry for a very late reply.
On Mon, Oct 6, 2014 at 11:37 AM, Miroslav Lichvar <mlichvar at redhat.com> wrote:
>> > To avoid polling servers frequently slowly increase the interval up
>> > to BIGPOLL when
>> > - no replies are received from a peer
>> > - no source can be selected
>> > - peer claims to be unsynchronized (e.g. we are polling it too
>> > frequently)
>> > - recv() returns with an error (e.g. the host doesn't exist or is not
>> > running an NTP service)
>>
>> Thanks! Applied with small changes.
>
> Great, thanks!
>
> The changes you have made to the patch seems to disable increasing the
> polling interval when the -w option is used, was that intended?
Are you referring to this hunk being not applied?
- /* Decide when to send new query for this peer */
+ /* Decide when to send new query for this peer. When recv() is failing,
+ * no peer can be selected or the peer is unsynchronized, slowly
+ * increase the polling interval up to BIGPOLL to not overload the peer
+ * or the network.
+ */
pick_normal_interval:
+ if (rc > 0 && G.poll_exp < BIGPOLL)
+ adjust_poll(POLLADJ_LIMIT / 8);
Yes, I thought about it and decided for now to not do this.
--
vda
More information about the busybox
mailing list