Browse Source

Don't log an error about a default initial renice value

Marc Di Luzio 6 years ago
parent
commit
b54a406b97
2 changed files with 2 additions and 11 deletions
  1. 1 1
      daemon/daemon_config.c
  2. 1 10
      daemon/gamemode-sched.c

+ 1 - 1
daemon/daemon_config.c

@@ -227,7 +227,7 @@ static void load_config_files(GameModeConfig *self)
 	memset(self->defaultgov, 0, sizeof(self->defaultgov));
 	memset(self->desiredgov, 0, sizeof(self->desiredgov));
 	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;
 
 	/*

+ 1 - 10
daemon/gamemode-sched.c

@@ -48,11 +48,6 @@ POSSIBILITY OF SUCH DAMAGE.
 #define SCHED_ISO 4
 #endif
 
-/**
- * Priority to renice the process to.
- */
-#define NICE_DEFAULT_PRIORITY -4
-
 /**
  * Apply scheduling policies
  *
@@ -74,11 +69,7 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client)
 	long int renice = 0;
 	config_get_renice_value(config, &renice);
 	if ((renice < 1) || (renice > 20)) {
-		LOG_ONCE(ERROR,
-		         "Invalid renice value '%ld' reset to default: %d.\n",
-		         renice,
-		         -NICE_DEFAULT_PRIORITY);
-		renice = NICE_DEFAULT_PRIORITY;
+		LOG_ONCE(ERROR, "Invalid renice value '%ld' is invalid, will not renice.\n", renice);
 	} else {
 		renice = -renice;
 	}