kondemand에는 더 많은 컨텍스트 스위치가 있습니다

kondemand에는 더 많은 컨텍스트 스위치가 있습니다

온라인 문서에 따르면 kondemandCPU 확장 조절기를 담당합니다.

kondemand는 사용 통계에 따라 시스템의 p-상태를 변경하는 cpufreq 하위 시스템의 ondemand 조정기에 속하는 커널 스레드입니다. 따라서 전원 관리에 도움이 됩니다.

그래서 내가 그랬어

# cpupower frequency-info --governors
analyzing CPU 0:
  available cpufreq governors: ondemand userspace performance
# cpupower frequency-set --governor performance
    Setting cpu: 0
    Setting cpu: 1
    Setting cpu: 2
    Setting cpu: 3
    Setting cpu: 4
    Setting cpu: 5
    Setting cpu: 6
    Setting cpu: 7
    Setting cpu: 8
    Setting cpu: 9
    Setting cpu: 10
    Setting cpu: 11
    Setting cpu: 12
    Setting cpu: 13
    Setting cpu: 14
    Setting cpu: 15
    Setting cpu: 16
    Setting cpu: 17
    Setting cpu: 18
    Setting cpu: 19
    Setting cpu: 20
    Setting cpu: 21
    Setting cpu: 22
    Setting cpu: 23
    Setting cpu: 24
    Setting cpu: 25
    Setting cpu: 26
    Setting cpu: 27
    Setting cpu: 28
    Setting cpu: 29
    Setting cpu: 30
    Setting cpu: 31

그러나 pidstat -wt많은 수의 프로세스 컨텍스트 스위치가 표시됩니다 kondemand.

    02:51:07 PM      TGID       TID   cswch/s nvcswch/s  Command
    02:51:07 PM      2243         -     93.87      0.00  kondemand/0
    02:51:07 PM         -      2243     93.87      0.00  |__kondemand/0
    02:51:07 PM      2244         -     95.29      0.00  kondemand/1
    02:51:07 PM         -      2244     95.29      0.00  |__kondemand/1
    02:51:07 PM      2245         -     92.25      0.00  kondemand/2
    02:51:07 PM         -      2245     92.25      0.00  |__kondemand/2
    02:51:07 PM      2246         -     94.72      0.00  kondemand/3
    02:51:07 PM         -      2246     94.72      0.00  |__kondemand/3
    02:51:07 PM      2247         -     91.33      0.00  kondemand/4
    02:51:07 PM         -      2247     91.33      0.00  |__kondemand/4
    02:51:07 PM      2248         -     94.49      0.00  kondemand/5
    02:51:07 PM         -      2248     94.49      0.00  |__kondemand/5
    02:51:07 PM      2249         -     90.97      0.00  kondemand/6
    02:51:07 PM         -      2249     90.97      0.00  |__kondemand/6
    02:51:07 PM      2250         -     94.54      0.00  kondemand/7
    02:51:07 PM         -      2250     94.54      0.00  |__kondemand/7
    02:51:07 PM      2251         -     92.77      0.00  kondemand/8
    02:51:07 PM         -      2251     92.77      0.00  |__kondemand/8
    02:51:07 PM      2252         -     94.92      0.00  kondemand/9
    02:51:07 PM         -      2252     94.92      0.00  |__kondemand/9
    02:51:07 PM      2253         -     92.39      0.00  kondemand/10
    02:51:07 PM         -      2253     92.39      0.00  |__kondemand/10
    02:51:07 PM      2254         -     95.18      0.00  kondemand/11
    02:51:07 PM         -      2254     95.18      0.00  |__kondemand/11
    02:51:07 PM      2255         -     92.27      0.00  kondemand/12
    02:51:07 PM         -      2255     92.27      0.00  |__kondemand/12
    02:51:07 PM      2256         -     95.18      0.00  kondemand/13
    02:51:07 PM         -      2256     95.18      0.00  |__kondemand/13
    02:51:07 PM      2257         -     91.39      0.00  kondemand/14
    02:51:07 PM         -      2257     91.39      0.00  |__kondemand/14
    02:51:07 PM      2258         -     95.08      0.00  kondemand/15
    02:51:07 PM         -      2258     95.08      0.00  |__kondemand/15
    02:51:07 PM      2259         -     92.81      0.00  kondemand/16
    02:51:07 PM         -      2259     92.81      0.00  |__kondemand/16
    02:51:07 PM      2260         -     95.03      0.00  kondemand/17
    02:51:07 PM         -      2260     95.03      0.00  |__kondemand/17
    02:51:07 PM      2261         -     92.61      0.00  kondemand/18
    02:51:07 PM         -      2261     92.61      0.00  |__kondemand/18
    02:51:07 PM      2262         -     95.23      0.00  kondemand/19
    02:51:07 PM         -      2262     95.23      0.00  |__kondemand/19
    02:51:07 PM      2263         -     91.93      0.00  kondemand/20
    02:51:07 PM         -      2263     91.93      0.00  |__kondemand/20
    02:51:07 PM      2264         -     95.36      0.00  kondemand/21
    02:51:07 PM         -      2264     95.36      0.00  |__kondemand/21
    02:51:07 PM      2265         -     91.72      0.00  kondemand/22
    02:51:07 PM         -      2265     91.72      0.00  |__kondemand/22
    02:51:07 PM      2266         -     95.12      0.00  kondemand/23
    02:51:07 PM         -      2266     95.12      0.00  |__kondemand/23
    02:51:07 PM      2267         -     92.60      0.00  kondemand/24
    02:51:07 PM         -      2267     92.60      0.00  |__kondemand/24
    02:51:07 PM      2268         -     95.14      0.00  kondemand/25
    02:51:07 PM         -      2268     95.14      0.00  |__kondemand/25
    02:51:07 PM      2269         -     92.25      0.00  kondemand/26
    02:51:07 PM         -      2269     92.25      0.00  |__kondemand/26
    02:51:07 PM      2270         -     95.49      0.00  kondemand/27
    02:51:07 PM         -      2270     95.49      0.00  |__kondemand/27
    02:51:07 PM      2271         -     92.02      0.00  kondemand/28
    02:51:07 PM         -      2271     92.02      0.00  |__kondemand/28
    02:51:07 PM      2272         -     95.07      0.00  kondemand/29
    02:51:07 PM         -      2272     95.07      0.00  |__kondemand/29
    02:51:07 PM      2273         -     91.49      0.00  kondemand/30
    02:51:07 PM         -      2273     91.49      0.00  |__kondemand/30
    02:51:07 PM      2274         -     95.32      0.00  kondemand/31
    02:51:07 PM         -      2274     95.32      0.00  |__kondemand/31

그렇다면 문제는 왜 프로세스가 컨텍스트 스위치를 많이 사용하는가입니다.

관련 정보