View | Details | Raw Unified | Return to ticket 2526
Collapse All | Expand All

(-)a/doc/man/man1/salloc.1 (-2 / +1 lines)
Lines 335-342 TaskPlugin=task/cgroup with the "ConstrainCores" option) is not Link Here
335
configured, this parameter is ignored.
335
configured, this parameter is ignored.
336
336
337
\fBNOTE\fR: When the step completes, the frequency and governor of each
337
\fBNOTE\fR: When the step completes, the frequency and governor of each
338
selected CPU is reset to the configured \fBCpuFreqDef\fR value with a
338
selected CPU is reset to the previous values.
339
default value of the OnDemand CPU governor.
340
339
341
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
340
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
342
with linuxproc as the ProctrackType can cause jobs to run too quickly before
341
with linuxproc as the ProctrackType can cause jobs to run too quickly before
(-)a/doc/man/man1/sbatch.1 (-2 / +1 lines)
Lines 362-369 TaskPlugin=task/cgroup with the "ConstrainCores" option) is not Link Here
362
configured, this parameter is ignored.
362
configured, this parameter is ignored.
363
363
364
\fBNOTE\fR: When the step completes, the frequency and governor of each
364
\fBNOTE\fR: When the step completes, the frequency and governor of each
365
selected CPU is reset to the configured \fBCpuFreqDef\fR value with a
365
selected CPU is reset to the previous values.
366
default value of the OnDemand CPU governor.
367
366
368
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
367
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
369
with linuxproc as the ProctrackType can cause jobs to run too quickly before
368
with linuxproc as the ProctrackType can cause jobs to run too quickly before
(-)a/doc/man/man1/srun.1 (-2 / +1 lines)
Lines 528-535 TaskPlugin=task/cgroup with the "ConstrainCores" option) is not Link Here
528
configured, this parameter is ignored.
528
configured, this parameter is ignored.
529
529
530
\fBNOTE\fR: When the step completes, the frequency and governor of each
530
\fBNOTE\fR: When the step completes, the frequency and governor of each
531
selected CPU is reset to the configured \fBCpuFreqDef\fR value with a
531
selected CPU is reset to the previous values.
532
default value of the OnDemand CPU governor.
533
532
534
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
533
\fBNOTE\fR: When submitting jobs with  the \fB\-\-cpu\-freq\fR option
535
with linuxproc as the ProctrackType can cause jobs to run too quickly before
534
with linuxproc as the ProctrackType can cause jobs to run too quickly before
(-)a/doc/man/man5/slurm.conf.5 (-18 / +7 lines)
Lines 474-502 used for all other system types Link Here
474
474
475
.TP
475
.TP
476
\fBCpuFreqDef\fR
476
\fBCpuFreqDef\fR
477
Default CPU frequency to be set when no jobs are running.
477
Default CPU frequency governor to use when running a job step if it
478
The CPU frequency can also be set to this value after a catastrophic failure
478
has not been explicitly set with the \-\-cpu\-freq option.
479
when state information has been lost.
480
Acceptable values at present include:
479
Acceptable values at present include:
481
.RS
480
.RS
482
.TP 14
481
.TP 14
483
\fBLow\fR
484
the lowest available frequency
485
.TP
486
\fBHigh\fR
487
the highest available frequency
488
.TP
489
\fBHighM1\fR
490
(high minus one) will select the next highest available frequency
491
.TP
492
\fBMedium\fR
493
attempts to set a frequency in the middle of the available range
494
.TP
495
\fBConservative\fR
482
\fBConservative\fR
496
attempts to use the Conservative CPU governor
483
attempts to use the Conservative CPU governor
497
.TP
484
.TP
498
\fBOnDemand\fR
485
\fBOnDemand\fR
499
attempts to use the OnDemand CPU governor (the default value)
486
attempts to use the OnDemand CPU governor
500
.TP
487
.TP
501
\fBPerformance\fR
488
\fBPerformance\fR
502
attempts to use the Performance CPU governor
489
attempts to use the Performance CPU governor
Lines 504-509 attempts to use the Performance CPU governor Link Here
504
\fBPowerSave\fR
491
\fBPowerSave\fR
505
attempts to use the PowerSave CPU governor
492
attempts to use the PowerSave CPU governor
506
.RE
493
.RE
494
There is no default value. If unset, no attempt to set the governor is
495
made if the \-\-cpu\-freq option has not been set.
507
496
508
.TP
497
.TP
509
\fBCpuFreqGovernors\fR
498
\fBCpuFreqGovernors\fR
Lines 519-525 attempts to use the Conservative CPU governor Link Here
519
attempts to use the OnDemand CPU governor (the default value)
508
attempts to use the OnDemand CPU governor (the default value)
520
.TP
509
.TP
521
\fBPerformance\fR
510
\fBPerformance\fR
522
attempts to use the Performance CPU governor
511
attempts to use the Performance CPU governor (the default value)
523
.TP
512
.TP
524
\fBPowerSave\fR
513
\fBPowerSave\fR
525
attempts to use the PowerSave CPU governor
514
attempts to use the PowerSave CPU governor
Lines 527-533 attempts to use the PowerSave CPU governor Link Here
527
\fBUserSpace\fR
516
\fBUserSpace\fR
528
attempts to use the UserSpace CPU governor
517
attempts to use the UserSpace CPU governor
529
.RE
518
.RE
530
The default is OnDemand.
519
The default is OnDemand, Performance.
531
.TP
520
.TP
532
\fBCryptoType\fR
521
\fBCryptoType\fR
533
The cryptographic signature tool to be used in the creation of
522
The cryptographic signature tool to be used in the creation of
(-)a/src/common/cpu_frequency.c (-17 / +22 lines)
Lines 4-9 Link Here
4
 *  Copyright (C) 2012 Bull
4
 *  Copyright (C) 2012 Bull
5
 *  Written by Don Albert, <don.albert@bull.com>
5
 *  Written by Don Albert, <don.albert@bull.com>
6
 *  Modified by Rod Schultz, <rod.schultz@bull.com> for min-max:gov
6
 *  Modified by Rod Schultz, <rod.schultz@bull.com> for min-max:gov
7
 *  Modified by Janne Blomqvist, <janne.blomqvist@aalto.fi> for
8
 *  intel_pstate support
7
 *
9
 *
8
 *  This file is part of SLURM, a resource management program.
10
 *  This file is part of SLURM, a resource management program.
9
 *  For details, see <http://slurm.schedmd.com/>.
11
 *  For details, see <http://slurm.schedmd.com/>.
Lines 208-218 _cpu_freq_cpu_avail(int cpuidx) Link Here
208
	snprintf(path, sizeof(path),  PATH_TO_CPU
210
	snprintf(path, sizeof(path),  PATH_TO_CPU
209
		 "cpu%u/cpufreq/scaling_available_frequencies", cpuidx);
211
		 "cpu%u/cpufreq/scaling_available_frequencies", cpuidx);
210
	if ( ( fp = fopen(path, "r") ) == NULL ) {
212
	if ( ( fp = fopen(path, "r") ) == NULL ) {
211
		static bool open_err_log = true;	/* Log once */
213
		/* Don't log an error here,
212
		if (open_err_log) {
214
		 * scaling_available_frequencies does not exist when
213
			error("%s: Could not open %s", __func__, path);
215
		 * using the intel_pstate driver.  */
214
			open_err_log = false;
215
		}
216
		return SLURM_FAILURE;
216
		return SLURM_FAILURE;
217
	}
217
	}
218
	for (i = 0; i < (FREQ_LIST_MAX-1); i++) {
218
	for (i = 0; i < (FREQ_LIST_MAX-1); i++) {
Lines 424-429 cpu_freq_cpuset_validate(stepd_step_rec_t *job) Link Here
424
	char *cpu_str;
424
	char *cpu_str;
425
	char *savestr = NULL;
425
	char *savestr = NULL;
426
426
427
427
	debug_flags = slurm_get_debug_flags(); /* init for slurmstepd */
428
	debug_flags = slurm_get_debug_flags(); /* init for slurmstepd */
428
	if (debug_flags & DEBUG_FLAG_CPU_FREQ) {
429
	if (debug_flags & DEBUG_FLAG_CPU_FREQ) {
429
		info("cpu_freq_cpuset_validate: request: min=(%12d  %8x) "
430
		info("cpu_freq_cpuset_validate: request: min=(%12d  %8x) "
Lines 761-769 _cpu_freq_current_state(int cpuidx) Link Here
761
	 * than the 'cpuinfo' values.
762
	 * than the 'cpuinfo' values.
762
	 * The 'cpuinfo' values are read only. min/max seem to be raw
763
	 * The 'cpuinfo' values are read only. min/max seem to be raw
763
	 * hardware capability.
764
	 * hardware capability.
764
	 * The 'scaling' values are set by the governor
765
	 * The 'scaling' values are set by the governor.
766
	 * For the current frequency, use the cpuinfo_cur_freq file
767
	 * since the intel_pstate driver doesn't necessarily create
768
	 * the scaling_cur_freq file.
765
	 */
769
	 */
766
	freq = _cpu_freq_get_scaling_freq(cpuidx, "scaling_cur_freq");
770
	freq = _cpu_freq_get_scaling_freq(cpuidx, "cpuinfo_cur_freq");
767
	if (freq == 0)
771
	if (freq == 0)
768
		return SLURM_FAILURE;
772
		return SLURM_FAILURE;
769
	cpufreq[cpuidx].org_frequency = freq;
773
	cpufreq[cpuidx].org_frequency = freq;
Lines 898-910 _cpu_freq_setup_data(stepd_step_rec_t *job, int cpx) Link Here
898
	if (   (job->cpu_freq_min == NO_VAL || job->cpu_freq_min==0)
902
	if (   (job->cpu_freq_min == NO_VAL || job->cpu_freq_min==0)
899
	    && (job->cpu_freq_max == NO_VAL || job->cpu_freq_max==0)
903
	    && (job->cpu_freq_max == NO_VAL || job->cpu_freq_max==0)
900
	    && (job->cpu_freq_gov == NO_VAL || job->cpu_freq_gov==0)) {
904
	    && (job->cpu_freq_gov == NO_VAL || job->cpu_freq_gov==0)) {
901
		return; /* No --cpu-freq */
905
		/* If no --cpu-freq, use default governor from conf file.  */
906
		slurm_ctl_conf_t *conf = slurm_conf_lock();
907
		job->cpu_freq_gov = conf->cpu_freq_def;
908
		slurm_conf_unlock();
909
		if (job->cpu_freq_gov == NO_VAL)
910
			return;
902
	}
911
	}
903
912
904
	/* Get current state */
913
	/* Get current state */
905
	if (_cpu_freq_current_state(cpx) == SLURM_FAILURE)
914
	if (_cpu_freq_current_state(cpx) == SLURM_FAILURE)
906
		return;
915
		return;
907
	
916
908
	if (job->cpu_freq_min == NO_VAL &&
917
	if (job->cpu_freq_min == NO_VAL &&
909
	    job->cpu_freq_max != NO_VAL &&
918
	    job->cpu_freq_max != NO_VAL &&
910
	    job->cpu_freq_gov == NO_VAL) {
919
	    job->cpu_freq_gov == NO_VAL) {
Lines 1008-1013 _cpu_freq_check_freq(const char* arg) Link Here
1008
	return 0;
1017
	return 0;
1009
}
1018
}
1010
1019
1020
1011
/*
1021
/*
1012
 * set cpu frequency if possible for each cpu of the job step
1022
 * set cpu frequency if possible for each cpu of the job step
1013
 */
1023
 */
Lines 1020-1025 cpu_freq_set(stepd_step_rec_t *job) Link Here
1020
1030
1021
	if ((!cpu_freq_count) || (!cpufreq))
1031
	if ((!cpu_freq_count) || (!cpufreq))
1022
		return;
1032
		return;
1033
1023
	for (i = 0; i < cpu_freq_count; i++) {
1034
	for (i = 0; i < cpu_freq_count; i++) {
1024
		if (cpufreq[i].new_frequency == NO_VAL
1035
		if (cpufreq[i].new_frequency == NO_VAL
1025
		    && cpufreq[i].new_min_freq == NO_VAL
1036
		    && cpufreq[i].new_min_freq == NO_VAL
Lines 1377-1390 cpu_freq_verify_def(const char *arg, uint32_t *freq) Link Here
1377
		*freq = cpufreq;
1388
		*freq = cpufreq;
1378
		return 0;
1389
		return 0;
1379
	}
1390
	}
1380
	cpufreq = _cpu_freq_check_freq(arg);
1391
	error("%s: CpuFreqDef=%s invalid", __func__, arg);
1381
	if (cpufreq == 0) {
1392
	return -1;
1382
		error("cpu_freq_verify_def: CpuFreqDef=%s invalid", arg);
1383
		return -1;
1384
	}
1385
	debug3("cpu_freq_verify_def: %s set", arg);
1386
	*freq = cpufreq;
1387
	return 0;
1388
}
1393
}
1389
1394
1390
/*
1395
/*
(-)a/src/common/read_config.c (-4 / +4 lines)
Lines 3077-3098 _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) Link Here
3077
	if (s_p_get_string(&temp_str, "CpuFreqDef", hashtbl)) {
3077
	if (s_p_get_string(&temp_str, "CpuFreqDef", hashtbl)) {
3078
		if (cpu_freq_verify_def(temp_str, &conf->cpu_freq_def)) {
3078
		if (cpu_freq_verify_def(temp_str, &conf->cpu_freq_def)) {
3079
			error("Ignoring invalid CpuFreqDef: %s", temp_str);
3079
			error("Ignoring invalid CpuFreqDef: %s", temp_str);
3080
			conf->cpu_freq_def = CPU_FREQ_ONDEMAND;
3080
			conf->cpu_freq_def = NO_VAL;
3081
		}
3081
		}
3082
		xfree(temp_str);
3082
		xfree(temp_str);
3083
	} else {
3083
	} else {
3084
		conf->cpu_freq_def = CPU_FREQ_ONDEMAND;
3084
		conf->cpu_freq_def = NO_VAL;
3085
	}
3085
	}
3086
3086
3087
	if (s_p_get_string(&temp_str, "CpuFreqGovernors", hashtbl)) {
3087
	if (s_p_get_string(&temp_str, "CpuFreqGovernors", hashtbl)) {
3088
		if (cpu_freq_verify_govlist(temp_str, &conf->cpu_freq_govs)) {
3088
		if (cpu_freq_verify_govlist(temp_str, &conf->cpu_freq_govs)) {
3089
			error("Ignoring invalid CpuFreqGovernors: %s",
3089
			error("Ignoring invalid CpuFreqGovernors: %s",
3090
				temp_str);
3090
				temp_str);
3091
			conf->cpu_freq_govs = CPU_FREQ_ONDEMAND;
3091
			conf->cpu_freq_govs = CPU_FREQ_ONDEMAND | CPU_FREQ_PERFORMANCE;
3092
		}
3092
		}
3093
		xfree(temp_str);
3093
		xfree(temp_str);
3094
	} else {
3094
	} else {
3095
		conf->cpu_freq_govs = CPU_FREQ_ONDEMAND;
3095
		conf->cpu_freq_govs = CPU_FREQ_ONDEMAND | CPU_FREQ_PERFORMANCE;
3096
	}
3096
	}
3097
3097
3098
	if (!s_p_get_string(&conf->crypto_type, "CryptoType", hashtbl))
3098
	if (!s_p_get_string(&conf->crypto_type, "CryptoType", hashtbl))

Return to ticket 2526