Bug 118221

Summary: After CPU hotplug, cores remain idle
Product: Process Management Reporter: Davide (baldiniebaldini)
Component: OtherAssignee: process_other
Status: NEW ---    
Severity: normal CC: baldiniebaldini
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.5.4 vanilla Subsystem:
Regression: No Bisected commit-id:

Description Davide 2016-05-14 19:23:38 UTC
--- Synopsis

When I do:

    for c in /sys/devices/system/cpu/cpu*/online; do
        echo 0 >$c
    done

    # sleep 60
    for c in /sys/devices/system/cpu/cpu*/online; do
        echo 1 >$c
    done

cores above 0 remain idle, meaning that no threads appear to be assigned to them. I run a several dummy processes, like 'yes >/dev/null' and `top` reports a cumulative cpu percentage usage of only 100% among all processes (8 cores available), while the 60-seconds load average is steadily 8.

This:
    cat /sys/devices/system/cpu/cpu*/online
replies '1' for every cpu 1 to 7.

Dmesg (*) appended at bottom.

---- Hardware:

Dual xeon l5410, 4 cores per chip.


--- Miscellanea

- LXC is in use;
- KVM module is mounted;
- kernel is configured to not hotswap core 0 (CONFIG_BOOTPARAM_HOTPLUG_CPU0 false);
- the same problem happens on kernel 4.1.1 vanilla.


(*) Dmeseg:

[ 2214.621148] smpboot: CPU 1 is now offline
[ 2214.711114] smpboot: CPU 2 is now offline
[ 2214.801249] smpboot: CPU 3 is now offline
[ 2214.901186] smpboot: CPU 4 is now offline
[ 2215.010119] Broke affinity for irq 25
[ 2215.011273] smpboot: CPU 5 is now offline
[ 2215.110125] Broke affinity for irq 25
[ 2215.111162] smpboot: CPU 6 is now offline
[ 2215.220102] Broke affinity for irq 15
[ 2215.220123] Broke affinity for irq 25
[ 2215.221157] smpboot: CPU 7 is now offline
[ 2231.230726] x86: Booting SMP configuration:
[ 2231.230731] smpboot: Booting Node 0 Processor 1 APIC 0x4
[ 2231.340393] smpboot: Booting Node 0 Processor 2 APIC 0x1
[ 2231.430533] smpboot: Booting Node 0 Processor 3 APIC 0x5
[ 2231.530515] smpboot: Booting Node 0 Processor 4 APIC 0x2
[ 2231.640622] smpboot: Booting Node 0 Processor 5 APIC 0x6
[ 2231.730666] smpboot: Booting Node 0 Processor 6 APIC 0x3
[ 2231.860766] smpboot: Booting Node 0 Processor 7 APIC 0x7
Comment 1 Davide 2016-05-14 23:14:39 UTC
To rephrase concisely:

after executing
    for c in /sys/devices/system/cpu/cpu*/online; do
        echo 0 >$c
        echo 1 >$c
    done

all currently-running processes, as well as newly launched processes, executing from within an LXC environment remain bound to CPU 0. They won't use cores above cpu0.