diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-26 16:10:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-26 16:10:16 -0400 |
| commit | cc71efda829413b734a2349ed4b9de1ac012bbc2 (patch) | |
| tree | 9644152b3de02d2a0fb75d21617838a6d03d03f1 /kernel | |
| parent | ec30dcf7f425dc811ac365b5c4b0f097f98e569f (diff) | |
| parent | 4ff648decf4712d39f184fc2df3163f43975575a (diff) | |
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner:
"Three fixes for scheduler and kthread code:
- allow calling kthread_park() on an already parked thread
- restore the sched_pi_setprio() tracepoint behaviour
- clarify the unclear string for the scheduling domain debug output"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched, tracing: Fix trace_sched_pi_setprio() for deboosting
kthread: Allow kthread_park() on a parked kthread
sched/topology: Clarify root domain(s) debug string
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/kthread.c | 6 | ||||
| -rw-r--r-- | kernel/sched/topology.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 2017a39ab490..481951bf091d 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
| @@ -193,7 +193,7 @@ EXPORT_SYMBOL_GPL(kthread_parkme); | |||
| 193 | 193 | ||
| 194 | void kthread_park_complete(struct task_struct *k) | 194 | void kthread_park_complete(struct task_struct *k) |
| 195 | { | 195 | { |
| 196 | complete(&to_kthread(k)->parked); | 196 | complete_all(&to_kthread(k)->parked); |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | static int kthread(void *_create) | 199 | static int kthread(void *_create) |
| @@ -459,6 +459,7 @@ void kthread_unpark(struct task_struct *k) | |||
| 459 | if (test_bit(KTHREAD_IS_PER_CPU, &kthread->flags)) | 459 | if (test_bit(KTHREAD_IS_PER_CPU, &kthread->flags)) |
| 460 | __kthread_bind(k, kthread->cpu, TASK_PARKED); | 460 | __kthread_bind(k, kthread->cpu, TASK_PARKED); |
| 461 | 461 | ||
| 462 | reinit_completion(&kthread->parked); | ||
| 462 | clear_bit(KTHREAD_SHOULD_PARK, &kthread->flags); | 463 | clear_bit(KTHREAD_SHOULD_PARK, &kthread->flags); |
| 463 | wake_up_state(k, TASK_PARKED); | 464 | wake_up_state(k, TASK_PARKED); |
| 464 | } | 465 | } |
| @@ -483,9 +484,6 @@ int kthread_park(struct task_struct *k) | |||
| 483 | if (WARN_ON(k->flags & PF_EXITING)) | 484 | if (WARN_ON(k->flags & PF_EXITING)) |
| 484 | return -ENOSYS; | 485 | return -ENOSYS; |
| 485 | 486 | ||
| 486 | if (WARN_ON_ONCE(test_bit(KTHREAD_SHOULD_PARK, &kthread->flags))) | ||
| 487 | return -EBUSY; | ||
| 488 | |||
| 489 | set_bit(KTHREAD_SHOULD_PARK, &kthread->flags); | 487 | set_bit(KTHREAD_SHOULD_PARK, &kthread->flags); |
| 490 | if (k != current) { | 488 | if (k != current) { |
| 491 | wake_up_process(k); | 489 | wake_up_process(k); |
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 64cc564f5255..61a1125c1ae4 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c | |||
| @@ -1708,7 +1708,7 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att | |||
| 1708 | rcu_read_unlock(); | 1708 | rcu_read_unlock(); |
| 1709 | 1709 | ||
| 1710 | if (rq && sched_debug_enabled) { | 1710 | if (rq && sched_debug_enabled) { |
| 1711 | pr_info("span: %*pbl (max cpu_capacity = %lu)\n", | 1711 | pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n", |
| 1712 | cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity); | 1712 | cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity); |
| 1713 | } | 1713 | } |
| 1714 | 1714 | ||
