Commit 192d852
sched/mmcid: Avoid full tasklist walks
Chasing vfork()'ed tasks on a CID ownership mode switch requires a full
task list walk, which is obviously expensive on large systems.
Avoid that by keeping a list of tasks using a mm MMCID entity in mm::mm_cid
and walk this list instead. This removes the proven to be flaky counting
logic and avoids a full task list walk in the case of vfork()'ed tasks.
Fixes: fbd0e71 ("sched/mmcid: Provide CID ownership mode fixup functions")
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260310202526.183824481@kernel.org1 parent 7574ac6 commit 192d852
3 files changed
Lines changed: 18 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
186 | | - | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
1003 | 1004 | | |
1004 | 1005 | | |
1005 | 1006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10620 | 10620 | | |
10621 | 10621 | | |
10622 | 10622 | | |
10623 | | - | |
| 10623 | + | |
10624 | 10624 | | |
10625 | 10625 | | |
10626 | 10626 | | |
10627 | | - | |
10628 | | - | |
10629 | | - | |
10630 | 10627 | | |
10631 | 10628 | | |
10632 | 10629 | | |
10633 | 10630 | | |
10634 | 10631 | | |
10635 | 10632 | | |
10636 | 10633 | | |
10637 | | - | |
10638 | 10634 | | |
10639 | 10635 | | |
10640 | | - | |
| 10636 | + | |
10641 | 10637 | | |
10642 | | - | |
10643 | | - | |
10644 | | - | |
10645 | | - | |
10646 | | - | |
10647 | | - | |
10648 | | - | |
10649 | | - | |
10650 | | - | |
10651 | | - | |
10652 | | - | |
10653 | | - | |
10654 | | - | |
10655 | | - | |
10656 | | - | |
10657 | | - | |
10658 | | - | |
10659 | | - | |
10660 | | - | |
10661 | | - | |
10662 | | - | |
10663 | | - | |
10664 | | - | |
| 10638 | + | |
| 10639 | + | |
10665 | 10640 | | |
10666 | | - | |
10667 | | - | |
| 10641 | + | |
10668 | 10642 | | |
10669 | | - | |
10670 | | - | |
10671 | | - | |
10672 | | - | |
10673 | | - | |
| 10643 | + | |
| 10644 | + | |
| 10645 | + | |
| 10646 | + | |
10674 | 10647 | | |
10675 | | - | |
10676 | | - | |
10677 | | - | |
10678 | | - | |
10679 | | - | |
10680 | 10648 | | |
10681 | | - | |
10682 | 10649 | | |
10683 | 10650 | | |
10684 | 10651 | | |
| |||
10687 | 10654 | | |
10688 | 10655 | | |
10689 | 10656 | | |
| 10657 | + | |
10690 | 10658 | | |
10691 | 10659 | | |
10692 | 10660 | | |
| |||
10744 | 10712 | | |
10745 | 10713 | | |
10746 | 10714 | | |
| 10715 | + | |
10747 | 10716 | | |
10748 | 10717 | | |
10749 | 10718 | | |
| |||
10886 | 10855 | | |
10887 | 10856 | | |
10888 | 10857 | | |
| 10858 | + | |
10889 | 10859 | | |
10890 | 10860 | | |
10891 | 10861 | | |
| |||
0 commit comments