|
Lines 84-90
Link Here
|
| 84 |
|
84 |
|
| 85 |
/* Maximum poll wait time for child processes, in milliseconds */ |
85 |
/* Maximum poll wait time for child processes, in milliseconds */ |
| 86 |
#define MAX_POLL_WAIT 500 |
86 |
#define MAX_POLL_WAIT 500 |
| 87 |
#define SYSCFG_TIMEOUT 1000 |
87 |
#define DEFAULT_SYSCFG_TIMEOUT 5000 |
|
|
88 |
#define MIN_SYSCFG_TIMEOUT 1000 |
| 88 |
|
89 |
|
| 89 |
/* Intel Knights Landing Configuration Modes */ |
90 |
/* Intel Knights Landing Configuration Modes */ |
| 90 |
#define KNL_NUMA_CNT 5 |
91 |
#define KNL_NUMA_CNT 5 |
|
Lines 162-167
static bool debug_flag = false;
Link Here
|
| 162 |
static uint16_t default_mcdram = KNL_CACHE; |
163 |
static uint16_t default_mcdram = KNL_CACHE; |
| 163 |
static uint16_t default_numa = KNL_ALL2ALL; |
164 |
static uint16_t default_numa = KNL_ALL2ALL; |
| 164 |
static char *mc_path = NULL; |
165 |
static char *mc_path = NULL; |
|
|
166 |
static uint32_t syscfg_timeout = 0; |
| 165 |
static bool reconfig = false; |
167 |
static bool reconfig = false; |
| 166 |
static time_t shutdown_time = 0; |
168 |
static time_t shutdown_time = 0; |
| 167 |
static char *syscfg_path = NULL; |
169 |
static char *syscfg_path = NULL; |
|
Lines 183-188
static s_p_options_t knl_conf_file_options[] = {
Link Here
|
| 183 |
{"LogFile", S_P_STRING}, |
185 |
{"LogFile", S_P_STRING}, |
| 184 |
{"McPath", S_P_STRING}, |
186 |
{"McPath", S_P_STRING}, |
| 185 |
{"SyscfgPath", S_P_STRING}, |
187 |
{"SyscfgPath", S_P_STRING}, |
|
|
188 |
{"SyscfgTimeout", S_P_UINT32}, |
| 186 |
{"UmeCheckInterval", S_P_UINT32}, |
189 |
{"UmeCheckInterval", S_P_UINT32}, |
| 187 |
{NULL} |
190 |
{NULL} |
| 188 |
}; |
191 |
}; |
|
Lines 500-509
static char *_run_script(char *cmd_path, char **script_argv, int *status)
Link Here
|
| 500 |
fds.fd = pfd[0]; |
503 |
fds.fd = pfd[0]; |
| 501 |
fds.events = POLLIN | POLLHUP | POLLRDHUP; |
504 |
fds.events = POLLIN | POLLHUP | POLLRDHUP; |
| 502 |
fds.revents = 0; |
505 |
fds.revents = 0; |
| 503 |
new_wait = SYSCFG_TIMEOUT - _tot_wait(&tstart); |
506 |
new_wait = syscfg_timeout - _tot_wait(&tstart); |
| 504 |
if (new_wait <= 0) { |
507 |
if (new_wait <= 0) { |
| 505 |
error("%s: %s poll timeout @ %d msec", |
508 |
error("%s: %s poll timeout @ %d msec", |
| 506 |
__func__, script_argv[1], SYSCFG_TIMEOUT); |
509 |
__func__, script_argv[1], syscfg_timeout); |
| 507 |
break; |
510 |
break; |
| 508 |
} |
511 |
} |
| 509 |
new_wait = MIN(new_wait, MAX_POLL_WAIT); |
512 |
new_wait = MIN(new_wait, MAX_POLL_WAIT); |
|
Lines 672-677
extern int init(void)
Link Here
|
| 672 |
allow_numa = KNL_NUMA_FLAG; |
675 |
allow_numa = KNL_NUMA_FLAG; |
| 673 |
xfree(allowed_uid); |
676 |
xfree(allowed_uid); |
| 674 |
allowed_uid_cnt = 0; |
677 |
allowed_uid_cnt = 0; |
|
|
678 |
syscfg_timeout = DEFAULT_SYSCFG_TIMEOUT; |
| 675 |
debug_flag = false; |
679 |
debug_flag = false; |
| 676 |
default_mcdram = KNL_CACHE; |
680 |
default_mcdram = KNL_CACHE; |
| 677 |
default_numa = KNL_ALL2ALL; |
681 |
default_numa = KNL_ALL2ALL; |
|
Lines 727-732
extern int init(void)
Link Here
|
| 727 |
} |
731 |
} |
| 728 |
(void) s_p_get_string(&mc_path, "McPath", tbl); |
732 |
(void) s_p_get_string(&mc_path, "McPath", tbl); |
| 729 |
(void) s_p_get_string(&syscfg_path, "SyscfgPath", tbl); |
733 |
(void) s_p_get_string(&syscfg_path, "SyscfgPath", tbl); |
|
|
734 |
(void) s_p_get_uint32(&syscfg_timeout, "SyscfgTimeout", tbl); |
| 730 |
(void) s_p_get_uint32(&ume_check_interval, "UmeCheckInterval", |
735 |
(void) s_p_get_uint32(&ume_check_interval, "UmeCheckInterval", |
| 731 |
tbl); |
736 |
tbl); |
| 732 |
|
737 |
|
|
Lines 736-741
extern int init(void)
Link Here
|
| 736 |
rc = SLURM_ERROR; |
741 |
rc = SLURM_ERROR; |
| 737 |
} |
742 |
} |
| 738 |
xfree(knl_conf_file); |
743 |
xfree(knl_conf_file); |
|
|
744 |
syscfg_timeout = MAX(syscfg_timeout, MIN_SYSCFG_TIMEOUT); |
| 739 |
if (!mc_path) |
745 |
if (!mc_path) |
| 740 |
mc_path = xstrdup("/sys/devices/system/edac/mc"); |
746 |
mc_path = xstrdup("/sys/devices/system/edac/mc"); |
| 741 |
if (!syscfg_path) |
747 |
if (!syscfg_path) |
|
Lines 765-770
extern int init(void)
Link Here
|
| 765 |
default_mcdram_str, default_numa_str); |
771 |
default_mcdram_str, default_numa_str); |
| 766 |
info("McPath=%s", mc_path); |
772 |
info("McPath=%s", mc_path); |
| 767 |
info("SyscfgPath=%s", syscfg_path); |
773 |
info("SyscfgPath=%s", syscfg_path); |
|
|
774 |
info("SyscfgTimeout=%u msec", syscfg_timeout); |
| 768 |
info("UmeCheckInterval=%u", ume_check_interval); |
775 |
info("UmeCheckInterval=%u", ume_check_interval); |
| 769 |
xfree(allow_mcdram_str); |
776 |
xfree(allow_mcdram_str); |
| 770 |
xfree(allow_numa_str); |
777 |
xfree(allow_numa_str); |
|
Lines 805-810
extern int fini(void)
Link Here
|
| 805 |
xfree(mcdram_per_node); |
812 |
xfree(mcdram_per_node); |
| 806 |
xfree(mc_path); |
813 |
xfree(mc_path); |
| 807 |
xfree(syscfg_path); |
814 |
xfree(syscfg_path); |
|
|
815 |
xfree(syscfg_timeout); |
| 808 |
return SLURM_SUCCESS; |
816 |
return SLURM_SUCCESS; |
| 809 |
} |
817 |
} |
| 810 |
|
818 |
|
| 811 |
- |
|
|