The CID management is a complex beast, which affects both scheduling and task migration. The compaction mechanism forces random tasks of a process into task work on exit to user space causing latency spikes. Revert back to the initial simple bitmap allocating mechanics, which are known to have scalability issues as that allows to gradually build up a replacement functionality in a reviewable way.
Showing the changes to kernel/fork.c (1 of 4 files). Show all
Unified · Split
| @@ -955,10 +955,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node) · 954 unmodified lines | ||
| 955 | 955 | #endif |
| 956 | 956 | |
| 957 | 957 | #ifdef CONFIG_SCHED_MM_CID |
| 958 | − tsk->mm_cid = -1; | |
| 959 | − tsk->last_mm_cid = -1; | |
| 958 | + tsk->mm_cid = MM_CID_UNSET; | |
| 959 | + tsk->last_mm_cid = MM_CID_UNSET; | |
| 960 | 960 | tsk->mm_cid_active = 0; |
| 961 | − tsk->migrate_from_cpu = -1; | |
| 962 | 961 | #endif |
| 963 | 962 | return tsk; |
| 964 | 963 | |