Linux 中的任务调度程序和 CPU 隔离
tasks Scheduler and CPU isolation in Linux
我是一个内核新手,包括调度程序。我知道有一个 IO 调度程序和一个任务调度程序,根据这个 post IO 调度程序使用最终由任务计划处理的正常任务。
- So if I run an user space thread that was assigned to an isolated core (using isolcpus) and it will do some IO operation, will the the
task created by the IO scheduler get executed on the isolated core ?
- Since CFS seems to favor user interaction does this mean that CPU intensive threads might get a lower CPU time in the long run?
Isolating cores can help mitigate this issue?
- Isolating cores can decrease the scheduling latency (the time it takes for a thread that was marked as runnable to get executed ) for
the threads that are pined to the isolated cores?
So if I run an user space thread that was assigned to an isolated core
(using isolcpus) and it will do some IO operation, will the the task
created by the IO scheduler get executed on the isolated core ?
isolcpus
正在做的是将那个特定的核心从 cpu 的内核列表中取出,它可以在其中安排任务。因此,一旦您将 cpu 从内核的 cpu 列表中分离出来,它就永远不会在该核心上安排任何任务,无论该核心是空闲的还是正在被其他 process/thread 使用。
Since CFS seems to favor user interaction does this mean that CPU
intensive threads might get a lower CPU time in the long run?
Isolating cores can help mitigate this issue?
隔离 cpu 在我看来有完全不同的用途。基本上,如果您的应用程序同时具有快速线程(没有系统调用的线程,并且对延迟敏感)和慢速线程(具有系统调用的线程),您可能希望为您的快速线程提供专用的 cpu 核心,这样它们就不会被内核的调度进程打断,因此 运行 它们可以毫无噪音地完成。快速线程通常对延迟敏感。另一方面,慢速线程或对延迟不敏感且正在为您的应用程序提供支持逻辑的线程不需要专用的 cpu 内核。如前所述,isloting cpu 服务器有不同的用途。我们一直在我们的组织中做这一切。
Isolating cores can decrease the scheduling latency (the time it takes
for a thread that was marked as runnable to get executed ) for the
threads that are pined to the isolated cores?
因为你从内核的 cpus 列表中获取 cpus 这肯定会影响其他线程和进程,但是你又会想要额外考虑和注意真正的是什么您的延迟敏感代码,并且您希望将其与非延迟敏感代码分开。
希望对您有所帮助。
我是一个内核新手,包括调度程序。我知道有一个 IO 调度程序和一个任务调度程序,根据这个 post IO 调度程序使用最终由任务计划处理的正常任务。
- So if I run an user space thread that was assigned to an isolated core (using isolcpus) and it will do some IO operation, will the the task created by the IO scheduler get executed on the isolated core ?
- Since CFS seems to favor user interaction does this mean that CPU intensive threads might get a lower CPU time in the long run? Isolating cores can help mitigate this issue?
- Isolating cores can decrease the scheduling latency (the time it takes for a thread that was marked as runnable to get executed ) for the threads that are pined to the isolated cores?
So if I run an user space thread that was assigned to an isolated core (using isolcpus) and it will do some IO operation, will the the task created by the IO scheduler get executed on the isolated core ?
isolcpus
正在做的是将那个特定的核心从 cpu 的内核列表中取出,它可以在其中安排任务。因此,一旦您将 cpu 从内核的 cpu 列表中分离出来,它就永远不会在该核心上安排任何任务,无论该核心是空闲的还是正在被其他 process/thread 使用。
Since CFS seems to favor user interaction does this mean that CPU intensive threads might get a lower CPU time in the long run? Isolating cores can help mitigate this issue?
隔离 cpu 在我看来有完全不同的用途。基本上,如果您的应用程序同时具有快速线程(没有系统调用的线程,并且对延迟敏感)和慢速线程(具有系统调用的线程),您可能希望为您的快速线程提供专用的 cpu 核心,这样它们就不会被内核的调度进程打断,因此 运行 它们可以毫无噪音地完成。快速线程通常对延迟敏感。另一方面,慢速线程或对延迟不敏感且正在为您的应用程序提供支持逻辑的线程不需要专用的 cpu 内核。如前所述,isloting cpu 服务器有不同的用途。我们一直在我们的组织中做这一切。
Isolating cores can decrease the scheduling latency (the time it takes for a thread that was marked as runnable to get executed ) for the threads that are pined to the isolated cores?
因为你从内核的 cpus 列表中获取 cpus 这肯定会影响其他线程和进程,但是你又会想要额外考虑和注意真正的是什么您的延迟敏感代码,并且您希望将其与非延迟敏感代码分开。
希望对您有所帮助。