RS - fixed timeouts
- rs does not assume hz==60 - rs adjusts its timeout ticks by the system clock frequency - drivers have time to reply if hz is set too high (e.g. 1000+) for instance when debugging
This commit is contained in:
parent
ae9222a72b
commit
7c334e2670
3 changed files with 7 additions and 2 deletions
|
@ -38,8 +38,8 @@
|
|||
#define SF_USE_REPL 0x020 /* set when process has a replica */
|
||||
|
||||
/* Constants determining RS period and binary exponential backoff. */
|
||||
#define RS_INIT_T 600 /* allow T ticks for init */
|
||||
#define RS_DELTA_T 60 /* check every T ticks */
|
||||
#define RS_INIT_T (system_hz * 10) /* allow T ticks for init */
|
||||
#define RS_DELTA_T (system_hz) /* check every T ticks */
|
||||
#define BACKOFF_BITS (sizeof(long)*8) /* bits in backoff field */
|
||||
#define MAX_BACKOFF 30 /* max backoff in RS_DELTA_T */
|
||||
|
||||
|
|
|
@ -52,5 +52,7 @@ EXTERN long rs_verbose;
|
|||
/* Set when we are shutting down. */
|
||||
EXTERN int shutting_down;
|
||||
|
||||
EXTERN unsigned system_hz;
|
||||
|
||||
#endif /* RS_GLO_H */
|
||||
|
||||
|
|
|
@ -169,6 +169,9 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
|||
/* See if we run in verbose mode. */
|
||||
env_parse("rs_verbose", "d", 0, &rs_verbose, 0, 1);
|
||||
|
||||
if ((s = sys_getinfo(GET_HZ, &system_hz, sizeof(system_hz), 0, 0)) != OK)
|
||||
panic("Cannot get system timer frequency\n");
|
||||
|
||||
/* Initialize the global init descriptor. */
|
||||
rinit.rproctab_gid = cpf_grant_direct(ANY, (vir_bytes) rprocpub,
|
||||
sizeof(rprocpub), CPF_READ);
|
||||
|
|
Loading…
Reference in a new issue