소스 검색

Fix hybrid CPU core pinning

Previously the condition would always evaluate to `false`. With the fix
any core with >=95% of `max_freq` will be added to the set of cores to
keep.
patatahooligan 1 년 전
부모
커밋
8cea4c2418
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      daemon/gamemode-cpu.c

+ 1 - 1
daemon/gamemode-cpu.c

@@ -134,7 +134,7 @@ static int walk_sysfs(char *cpulist, char **buf, size_t *buflen, GameModeCPUInfo
 						max_freq = freq;
 					}
 
-					if (freq - cutoff >= max_freq)
+					if (freq + cutoff >= max_freq)
 						CPU_SET_S((size_t)cpu, CPU_ALLOC_SIZE(info->num_cpu), freq_cores);
 				}
 			}