mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 23:57:22 +02:00
Don't log an error about a default initial renice value
This commit is contained in:
parent
a8539eade7
commit
b54a406b97
@ -227,7 +227,7 @@ static void load_config_files(GameModeConfig *self)
|
|||||||
memset(self->defaultgov, 0, sizeof(self->defaultgov));
|
memset(self->defaultgov, 0, sizeof(self->defaultgov));
|
||||||
memset(self->desiredgov, 0, sizeof(self->desiredgov));
|
memset(self->desiredgov, 0, sizeof(self->desiredgov));
|
||||||
memset(self->softrealtime, 0, sizeof(self->softrealtime));
|
memset(self->softrealtime, 0, sizeof(self->softrealtime));
|
||||||
self->renice = 0; /* 0 = use default */
|
self->renice = 4; /* default value of 4 */
|
||||||
self->reaper_frequency = DEFAULT_REAPER_FREQ;
|
self->reaper_frequency = DEFAULT_REAPER_FREQ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,11 +48,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#define SCHED_ISO 4
|
#define SCHED_ISO 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* Priority to renice the process to.
|
|
||||||
*/
|
|
||||||
#define NICE_DEFAULT_PRIORITY -4
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply scheduling policies
|
* Apply scheduling policies
|
||||||
*
|
*
|
||||||
@ -74,11 +69,7 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client)
|
|||||||
long int renice = 0;
|
long int renice = 0;
|
||||||
config_get_renice_value(config, &renice);
|
config_get_renice_value(config, &renice);
|
||||||
if ((renice < 1) || (renice > 20)) {
|
if ((renice < 1) || (renice > 20)) {
|
||||||
LOG_ONCE(ERROR,
|
LOG_ONCE(ERROR, "Invalid renice value '%ld' is invalid, will not renice.\n", renice);
|
||||||
"Invalid renice value '%ld' reset to default: %d.\n",
|
|
||||||
renice,
|
|
||||||
-NICE_DEFAULT_PRIORITY);
|
|
||||||
renice = NICE_DEFAULT_PRIORITY;
|
|
||||||
} else {
|
} else {
|
||||||
renice = -renice;
|
renice = -renice;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user