Commit 44e4e02
Peter Zijlstra
locking/mutex: Rework task_struct::blocked_on
Track the blocked-on relation for mutexes, to allow following this
relation at schedule time.
task
| blocked-on
v
mutex
| owner
v
task
This all will be used for tracking blocked-task/mutex chains
with the prox-execution patch in a similar fashion to how
priority inheritance is done with rt_mutexes.
For serialization, blocked-on is only set by the task itself
(current). And both when setting or clearing (potentially by
others), is done while holding the mutex::wait_lock.
[minor changes while rebasing]
[jstultz: Fix blocked_on tracking in __mutex_lock_common in error paths]
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Juri Lelli <[email protected]>
Signed-off-by: Connor O'Brien <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: K Prateek Nayak <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent 25c411f commit 44e4e02
File tree
5 files changed
+45
-12
lines changed- include/linux
- kernel
- locking
5 files changed
+45
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
| 1233 | + | |
1237 | 1234 | | |
1238 | 1235 | | |
1239 | 1236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2123 | 2123 | | |
2124 | 2124 | | |
2125 | 2125 | | |
2126 | | - | |
2127 | 2126 | | |
2128 | | - | |
| 2127 | + | |
2129 | 2128 | | |
2130 | 2129 | | |
2131 | 2130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
647 | 649 | | |
648 | 650 | | |
649 | 651 | | |
| |||
680 | 682 | | |
681 | 683 | | |
682 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
683 | 691 | | |
684 | 692 | | |
685 | 693 | | |
| |||
691 | 699 | | |
692 | 700 | | |
693 | 701 | | |
| 702 | + | |
| 703 | + | |
694 | 704 | | |
695 | 705 | | |
| 706 | + | |
696 | 707 | | |
697 | 708 | | |
698 | 709 | | |
699 | 710 | | |
700 | 711 | | |
701 | 712 | | |
702 | 713 | | |
| 714 | + | |
703 | 715 | | |
704 | 716 | | |
705 | 717 | | |
| |||
729 | 741 | | |
730 | 742 | | |
731 | 743 | | |
| 744 | + | |
732 | 745 | | |
733 | 746 | | |
734 | 747 | | |
| 748 | + | |
735 | 749 | | |
736 | 750 | | |
737 | 751 | | |
| |||
942 | 956 | | |
943 | 957 | | |
944 | 958 | | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
945 | 967 | | |
946 | 968 | | |
947 | 969 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
286 | 293 | | |
| 294 | + | |
287 | 295 | | |
288 | 296 | | |
289 | 297 | | |
| |||
331 | 339 | | |
332 | 340 | | |
333 | 341 | | |
334 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
335 | 349 | | |
336 | | - | |
| 350 | + | |
337 | 351 | | |
338 | 352 | | |
339 | 353 | | |
| |||
0 commit comments