[lkml]   [2008]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectACPI processor hotplug broken?
    Is anyone out there successfully using the ACPI processor driver
    and CPU hotplug? I've been playing with it for the past few days,
    and it *almost* works on my platform (ia64), but not quite.

    I can offline/online a CPU successfully via the sysfs interface.
    It's when I try and add ACPI into the mix that stuff starts going

    My understanding of reading the code and the stuff in
    Documentation/cpu-hotplug.txt is that what should be happening is

    - firmware sends ACPI_NOTIFY_BUS_CHECK or

    - if we got an eject request, simply emit a cpu offline
    uevent and let a udev script do the right thing (in
    this case, echo 0 > /sys/devices/system/cpu/cpuX/online)

    - if we got a bus/device check, it gets a little hairier,
    since the notify handler seems like it's going to
    toggle the state of the cpu.

    - first, try to find the cpu on the bus. If it
    does not exist, then call acpi_processor_device_add
    and we're done (after emitting a cpu online

    - else, we've found the cpu on the bus, so then
    check to see if its id is in the range of
    acceptable values. If so, we assume that it's
    online, and that we want to offline it, so emit
    a cpu offline uevent

    - if cpu is on the bus, but id is outside range
    of acceptable values, then call acpi_processor_start
    and emit a cpu online uevent

    Where I'm running into difficulty is in the bus/device check
    logic if the CPU has already been offlined via sysfs.

    For some reason, the call to acpi_bus_get_device() succeeds, so
    the "toggle" logic inside acpi_processor_hotplug_notify() thinks
    that we want to offline the CPU, rather than onlining it.

    We keep emitting cpu offline uevents, but really, we should be
    emitting cpu online uevents.

    So something seems off, and at this point, the possibilities I
    can see are:

    - at some point during the sysfs offline process
    (cpu_down and friends), platform code should have
    removed the ACPI CPU device from the bus

    - the toggle logic inside acpi_processor_hotplug_notify
    is broken, and the call to acpi_bus_get_device is bogus

    Anyone have any hints? Anyone using this successfully? Poking
    around in the x86/ tree wasn't very informative for me.



     \ /
      Last update: 2008-01-23 19:15    [W:0.020 / U:35.084 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site