Commit 1a03d3f
fork: Move task stack accounting to do_exit()
There is no need to perform the stack accounting of the outgoing task in
its final schedule() invocation which happens with preemption disabled.
The task is leaving, the resources will be freed and the accounting can
happen in do_exit() before the actual schedule invocation which
frees the stack memory.
Move the accounting of the stack memory from release_task_stack() to
exit_task_stack_account() which then can be invoked from do_exit().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20220217102406.3697941-7-bigeasy@linutronix.de1 parent f1c1a9e commit 1a03d3f
3 files changed
Lines changed: 26 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| 848 | + | |
848 | 849 | | |
849 | 850 | | |
850 | 851 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | | - | |
217 | 216 | | |
218 | 217 | | |
219 | 218 | | |
| |||
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
| |||
454 | 451 | | |
455 | 452 | | |
456 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
457 | 468 | | |
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
461 | 472 | | |
462 | | - | |
463 | 473 | | |
464 | 474 | | |
465 | 475 | | |
| |||
918 | 928 | | |
919 | 929 | | |
920 | 930 | | |
| 931 | + | |
921 | 932 | | |
922 | 933 | | |
923 | 934 | | |
| |||
961 | 972 | | |
962 | 973 | | |
963 | 974 | | |
964 | | - | |
965 | | - | |
966 | 975 | | |
967 | 976 | | |
968 | 977 | | |
| |||
981 | 990 | | |
982 | 991 | | |
983 | 992 | | |
| 993 | + | |
984 | 994 | | |
985 | 995 | | |
986 | 996 | | |
| |||
2459 | 2469 | | |
2460 | 2470 | | |
2461 | 2471 | | |
| 2472 | + | |
2462 | 2473 | | |
2463 | 2474 | | |
2464 | 2475 | | |
| |||
0 commit comments