Commit afcc401
committed
io-wq: provide an io_wq_put_and_exit() helper
If we put the io-wq from io_uring, we really want it to exit. Provide
a helper that does that for us. Couple that with not having the manager
hold a reference to the 'wq' and the normal SQPOLL exit will tear down
the io-wq context appropriate.
On the io-wq side, our wq context is per task, so only the task itself
is manipulating ->manager and hence it's safe to check and clear without
any extra locking. We just need to ensure that the manager task stays
around, in case it exits.
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 8629397 commit afcc401
3 files changed
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
752 | | - | |
| 752 | + | |
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | 774 | | |
776 | | - | |
777 | 775 | | |
778 | 776 | | |
779 | 777 | | |
| |||
816 | 814 | | |
817 | 815 | | |
818 | 816 | | |
819 | | - | |
820 | | - | |
821 | 817 | | |
822 | 818 | | |
823 | 819 | | |
| |||
1089 | 1085 | | |
1090 | 1086 | | |
1091 | 1087 | | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1092 | 1098 | | |
1093 | 1099 | | |
1094 | 1100 | | |
1095 | 1101 | | |
1096 | 1102 | | |
1097 | 1103 | | |
1098 | 1104 | | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
| 1105 | + | |
1103 | 1106 | | |
1104 | 1107 | | |
1105 | 1108 | | |
| |||
1112 | 1115 | | |
1113 | 1116 | | |
1114 | 1117 | | |
1115 | | - | |
1116 | 1118 | | |
1117 | 1119 | | |
1118 | 1120 | | |
| |||
1121 | 1123 | | |
1122 | 1124 | | |
1123 | 1125 | | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1124 | 1133 | | |
1125 | 1134 | | |
1126 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8857 | 8857 | | |
8858 | 8858 | | |
8859 | 8859 | | |
8860 | | - | |
| 8860 | + | |
8861 | 8861 | | |
8862 | 8862 | | |
8863 | 8863 | | |
| |||
0 commit comments