task_struct 中的 nivcsw 和 nvcsw 字段是什么?

What are nivcsw and nvcsw fields in task_struct?

我正在研究 Linux 中的进程。我的任务是在内核模块中为给定的进程 ID 查找 PCB 的某些字段。我找到了 this link about task_struct and I almost did the task, but I still don't know what are the fields nivcsw and nvcsw。他们存储什么?

nvcswnivcsw都是context switch counters。第一个表示自愿上下文切换的次数(Nnumber of Voluntary Context Switches)而第二个表示非自愿上下文切换的次数(NInV自愿 Context Sw痒).