Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349063
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] sched: Allow per-cpu kernel threads to run on online && !active |
| Date | 2016-03-03 13:00 +0100 |
| Message-ID | <r8A5d-6Bm-43@gated-at.bofh.it> (permalink) |
| References | <r7Upk-2rl-23@gated-at.bofh.it> <r8zVw-6xi-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Mar 03, 2016 at 12:43:53PM +0100, Thomas Gleixner wrote:
> Subject: cpu/hotplug: Handle cpu active as last state
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Thu, 03 Mar 2016 12:33:37 +0100
>
> We want to make sure that everything is initialized before we allow scheduling
> of arbitrary work on a upcoming CPU and we don't want to have no more random
> work on it when we shut it down.
>
> Now that the scheduler handles this nicely via the cpu_active_mask we can put
> set_cpu_active() as last action when a cpu is brought up and as first action
> when it goes down.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
Nice!
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> include/linux/cpuhotplug.h | 1 +
> kernel/cpu.c | 19 +++++++++++++++++--
> kernel/sched/core.c | 18 ------------------
> 3 files changed, 18 insertions(+), 20 deletions(-)
>
> +++ b/kernel/sched/core.c
> @@ -5726,23 +5726,6 @@ static int sched_cpu_active(struct notif
> case CPU_STARTING:
> set_cpu_rq_start_time();
If we stick that in notify_starting() we can kill all of this.
> return NOTIFY_OK;
> -
> - case CPU_DOWN_FAILED:
> - set_cpu_active(cpu, true);
> - return NOTIFY_OK;
> -
> - default:
> - return NOTIFY_DONE;
> - }
> -}
> -
> -static int sched_cpu_inactive(struct notifier_block *nfb,
> - unsigned long action, void *hcpu)
> -{
> - switch (action & ~CPU_TASKS_FROZEN) {
> - case CPU_DOWN_PREPARE:
> - set_cpu_active((long)hcpu, false);
> - return NOTIFY_OK;
> default:
> return NOTIFY_DONE;
> }
> @@ -5761,7 +5744,6 @@ static int __init migration_init(void)
>
> /* Register cpu active notifiers */
> cpu_notifier(sched_cpu_active, CPU_PRI_SCHED_ACTIVE);
> - cpu_notifier(sched_cpu_inactive, CPU_PRI_SCHED_INACTIVE);
>
> return 0;
> }
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] sched: Allow per-cpu kernel threads to run on online && !active Peter Zijlstra <peterz@infradead.org> - 2016-03-01 16:30 +0100
Re: [PATCH] sched: Allow per-cpu kernel threads to run on online && !active Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 12:50 +0100
Re: [PATCH] sched: Allow per-cpu kernel threads to run on online && !active Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 13:00 +0100
Re: [PATCH] sched: Allow per-cpu kernel threads to run on online && !active Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 18:50 +0100
Re: [PATCH] sched: Allow per-cpu kernel threads to run on online && !active Peter Zijlstra <peterz@infradead.org> - 2016-03-03 13:00 +0100
csiph-web