lkml.org 
[lkml]   [2012]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 00/10] Cleanup ipi_call_lock[_irq]()/ipi_call_unlock[_irq]()
    From
    Date
    On Tue, 2012-05-29 at 15:15 +0800, Yong Zhang wrote:
    > As discussed with Srivatsa [1], it seems there is no need to keep
    > ipi_call_[un]lock_irq() when cpu bring-up/down. Because:
    >
    > 1) call_function.lock used in smp_call_function_many() is just to protect
    > call_function.queue and &data->refs, cpu_online_mask is outside of the
    > lock. And it's not necessary to protect cpu_online_mask,
    > because data->cpumask is pre-calculate and even if a cpu is brougt up
    > when calling arch_send_call_function_ipi_mask(), it's harmless because
    > validation test in generic_smp_call_function_interrupt() will take care
    > of it.
    >
    > 2) For cpu down issue, stop_machine() will guarantee that no concurrent
    > smp_call_fuction() is processing.

    But that lock was only taken around setting a cpu online, so the offline
    case is pretty much irrelevant for these patches, right?

    That said, is there an alternative to stop_machine on the down side?

    I guess flipping the cpu offline and then doing synchronize_sched()
    should suffice.


    \
     
     \ /
      Last update: 2012-05-29 11:02    [W:2.520 / U:1.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site