sched: add new timeout class for peer transmissions
This allows transmissions in symmetric mode to be scheduled independently from client transmissions. This reduces maximum delay in scheduling when chronyd is configured with a larger number of servers.
This commit is contained in:
parent
c2773dbc2f
commit
1c51feb3c5
2 changed files with 4 additions and 2 deletions
|
@ -427,7 +427,8 @@ restart_timeout(NCR_Instance inst, double delay)
|
||||||
/* Start new timer for transmission */
|
/* Start new timer for transmission */
|
||||||
inst->tx_timeout_id = SCH_AddTimeoutInClass(delay, get_separation(inst->local_poll),
|
inst->tx_timeout_id = SCH_AddTimeoutInClass(delay, get_separation(inst->local_poll),
|
||||||
SAMPLING_RANDOMNESS,
|
SAMPLING_RANDOMNESS,
|
||||||
SCH_NtpSamplingClass,
|
inst->mode == MODE_CLIENT ?
|
||||||
|
SCH_NtpClientClass : SCH_NtpPeerClass,
|
||||||
transmit_timeout, (void *)inst);
|
transmit_timeout, (void *)inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
sched.h
3
sched.h
|
@ -34,7 +34,8 @@ typedef unsigned int SCH_TimeoutID;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SCH_ReservedTimeoutValue = 0,
|
SCH_ReservedTimeoutValue = 0,
|
||||||
SCH_NtpSamplingClass,
|
SCH_NtpClientClass,
|
||||||
|
SCH_NtpPeerClass,
|
||||||
SCH_NtpBroadcastClass,
|
SCH_NtpBroadcastClass,
|
||||||
SCH_NumberOfClasses /* needs to be last */
|
SCH_NumberOfClasses /* needs to be last */
|
||||||
} SCH_TimeoutClass;
|
} SCH_TimeoutClass;
|
||||||
|
|
Loading…
Reference in a new issue