[lkml]   [2012]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC PATCH 6/6] CPU hotplug: Invoke CPU offline notifiers in reverse order

    On Wed, Jul 25, 2012 at 05:25:13PM +0530, Srivatsa S. Bhat wrote:
    > During CPU hotplug, we want to create the following effect:
    > * During CPU online, the CPU incrementally grows the number of services
    > it offers.
    > * During CPU offline, the services are incrementally retired, in the
    > reverse order of their growth during CPU online.
    > To achieve the above, invoke the registered CPU hotplug notifiers in the
    > reverse order during CPU offline, with respect to the order in which they
    > were invoked during CPU online.
    > This approach helps in making the hotplug path a lot more logically
    > coherent: Services are started in a well-known order, perhaps with dependencies
    > between them, while bringing up a CPU. While offlining the CPU, we honor
    > many of the dependencies automatically by just backtracking the way we came;
    > that is, by invoking the notifiers in the reverse order. Thus, this model of
    > reverse notifier invocation helps us in avoiding the need for excessively
    > messing with the notifier priorities while trying to get the ordering right.
    > Notes:
    > 1. The workqueue code becomes simpler, since it now needs just a single CPU
    > hotplug callback.
    > 2. The scheduler's sched_cpu_[in]active() callbacks can also be merged into
    > a single callback.
    > 3. On similar lines, the cpusets' cpuset_cpu_[in]active() callbacks can also
    > be merged.
    > Signed-off-by: Srivatsa S. Bhat <>

    For workqueue part,

    Acked-by: Tejun Heo <>

    Now that we can reverse-walk notifier chain, it probably is a good
    idea to make it a bit smarter and call CANCELs in reverse order of
    PREPAREs too.



     \ /
      Last update: 2012-07-25 19:21    [W:0.040 / U:46.632 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site