forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commitc6e7bd7
Peter Zijlstra
Ingo Molnar
sched/core: Optimize ttwu() spinning on p->on_cpu
Both Rik and Mel reported seeing ttwu() spend significant time on: smp_cond_load_acquire(&p->on_cpu, !VAL);Attempt to avoid this by queueing the wakeup on the CPU that owns thep->on_cpu value. This will then allow the ttwu() to complete withoutfurther waiting.Since we run schedule() with interrupts disabled, the IPI isguaranteed to happen after p->on_cpu is cleared, this is what makes itsafe to queue early.Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Signed-off-by: Mel Gorman <mgorman@techsingularity.net>Signed-off-by: Ingo Molnar <mingo@kernel.org>Cc: Jirka Hladky <jhladky@redhat.com>Cc: Vincent Guittot <vincent.guittot@linaro.org>Cc: valentin.schneider@arm.comCc: Hillf Danton <hdanton@sina.com>Cc: Rik van Riel <riel@surriel.com>Link:https://lore.kernel.org/r/20200524202956.27665-2-mgorman@techsingularity.net1 parentd505b8a commitc6e7bd7
1 file changed
+31
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2312 | 2312 | | |
2313 | 2313 | | |
2314 | 2314 | | |
2315 | | - | |
| 2315 | + | |
2316 | 2316 | | |
2317 | 2317 | | |
2318 | 2318 | | |
| |||
2354 | 2354 | | |
2355 | 2355 | | |
2356 | 2356 | | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
2357 | 2368 | | |
2358 | 2369 | | |
2359 | 2370 | | |
| |||
2362 | 2373 | | |
2363 | 2374 | | |
2364 | 2375 | | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
| 2376 | + | |
2368 | 2377 | | |
2369 | | - | |
2370 | 2378 | | |
2371 | 2379 | | |
2372 | 2380 | | |
| |||
2548 | 2556 | | |
2549 | 2557 | | |
2550 | 2558 | | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
2551 | 2564 | | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
2552 | 2568 | | |
2553 | 2569 | | |
2554 | 2570 | | |
| |||
2570 | 2586 | | |
2571 | 2587 | | |
2572 | 2588 | | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
2573 | 2599 | | |
2574 | 2600 | | |
2575 | 2601 | | |
| |||
2581 | 2607 | | |
2582 | 2608 | | |
2583 | 2609 | | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | 2610 | | |
2593 | 2611 | | |
2594 | 2612 | | |
2595 | 2613 | | |
2596 | 2614 | | |
2597 | 2615 | | |
2598 | | - | |
2599 | | - | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
2606 | 2616 | | |
2607 | 2617 | | |
2608 | 2618 | | |
| |||
0 commit comments
Comments
(0)