[리눅스커널] 특정 CPU를 Isolation 시키고 싶은 경우
Post
원문 보기 →[리눅스커널] 특정 CPU를 Isolation 시키고 싶은 경우
프로젝트를 진행하다 보면 특정 CPU를 Isolation 시키고 싶을 때가 있습니다.이 때 다음 패치(CPU2와 CPU3를 Isolation)를 적용하면 됩니다. * 커널 4.19 버전diff --git a/kernel/cpu.c b/kernel/cpu.cindex d9f855c..816bf4f 100644--- a/kernel/cpu.c+++ b/kernel/cpu.c@@ -1126,6 +1126,10 @@ static int do_cpu_up(unsigned int cpu, enum cpuhp_state target) { int err = 0; + if(cpu == 2 | cpu ==3) {+ return -EINVAL;+ }+



