Repository navigation
Commit ec514c4
sched: Fix rt_rq runtime leakage bug
This patch is to fix the real-time scheduler bug reported at:
https://lkml.org/lkml/2011/4/26/13
That is, when running multiple real-time threads on every logical CPUs
and then turning off one CPU, the kernel will bug at function
__disable_runtime().
Function __disable_runtime() bugs and reports leakage of rt_rq runtime.
The root cause is __disable_runtime() assumes it iterates through all
the existing rt_rq's while walking rq->leaf_rt_rq_list, which actually
contains only runnable rt_rq's. This problem also applies to
__enable_runtime() and print_rt_stats().
The patch is based on above analysis, appears to fix the problem, but is
only lightly tested.
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Cheng Xu <chengxu@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/4DCE1F12.6040609@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>1 parent bd1a643 commit ec514c4
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
| |||
288 | 296 | | |
289 | 297 | | |
290 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
| |||
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
| 418 | + | |
405 | 419 | | |
406 | 420 | | |
407 | 421 | | |
408 | 422 | | |
409 | 423 | | |
410 | | - | |
| 424 | + | |
411 | 425 | | |
412 | 426 | | |
413 | 427 | | |
| |||
487 | 501 | | |
488 | 502 | | |
489 | 503 | | |
| 504 | + | |
490 | 505 | | |
491 | 506 | | |
492 | 507 | | |
| |||
495 | 510 | | |
496 | 511 | | |
497 | 512 | | |
498 | | - | |
| 513 | + | |
499 | 514 | | |
500 | 515 | | |
501 | 516 | | |
| |||
1796 | 1811 | | |
1797 | 1812 | | |
1798 | 1813 | | |
| 1814 | + | |
1799 | 1815 | | |
1800 | 1816 | | |
1801 | 1817 | | |
1802 | | - | |
| 1818 | + | |
1803 | 1819 | | |
1804 | 1820 | | |
1805 | 1821 | | |
| |||
0 commit comments