Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
xen.19021
5b4c9a60-allow-cpu_down-to-be-called-earlier.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5b4c9a60-allow-cpu_down-to-be-called-earlier.patch of Package xen.19021
# Commit 5894c0a2da66243a89088d309c7e1ea212ab28d6 # Date 2018-07-16 15:15:12 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> allow cpu_down() to be called earlier The function's use of the stop-machine logic has so far prevented its use ahead of the processing of the "ordinary" initcalls. Since at this early time we're in a controlled environment anyway, there's no need for such a heavy tool. Additionally this ought to have less of a performance impact especially on large systems, compared to the alternative of making stop-machine functionality available earlier. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -68,12 +68,17 @@ void __init register_cpu_notifier(struct spin_unlock(&cpu_add_remove_lock); } -static int take_cpu_down(void *unused) +static void _take_cpu_down(void *unused) { void *hcpu = (void *)(long)smp_processor_id(); int notifier_rc = notifier_call_chain(&cpu_chain, CPU_DYING, hcpu, NULL); BUG_ON(notifier_rc != NOTIFY_DONE); __cpu_disable(); +} + +static int take_cpu_down(void *arg) +{ + _take_cpu_down(arg); return 0; } @@ -99,7 +104,9 @@ int cpu_down(unsigned int cpu) goto fail; } - if ( (err = stop_machine_run(take_cpu_down, NULL, cpu)) < 0 ) + if ( unlikely(system_state < SYS_STATE_active) ) + on_selected_cpus(cpumask_of(cpu), _take_cpu_down, NULL, 1); + else if ( (err = stop_machine_run(take_cpu_down, NULL, cpu)) < 0 ) goto fail; __cpu_die(cpu);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor