lkml.org 
[lkml]   [2010]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 08/15] smp: Don't warn if irq are disabled but we don't wait for the ipi
    From
    Date
    On Mon, 2010-12-20 at 16:24 +0100, Frederic Weisbecker wrote:
    > The comment in smp_call_function_single() says it wants the irqs
    > to be enabled otherwise it may deadlock.
    >
    > I can't find the reason for that though, except if we had to wait
    > for a self triggered IPI but we execute the local IPI by just
    > calling the function in place.
    >
    > In doubt, only suppress the warning if we are not waiting for the
    > IPI to complete as it should really not raise any deadlock.
    >
    > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    > Cc: Thomas Gleixner <tglx@linutronix.de>
    > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    > Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    > Cc: Ingo Molnar <mingo@elte.hu>
    > Cc: Steven Rostedt <rostedt@goodmis.org>
    > Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
    > Cc: Andrew Morton <akpm@linux-foundation.org>
    > Cc: Anton Blanchard <anton@au1.ibm.com>
    > Cc: Tim Pepper <lnxninja@linux.vnet.ibm.com>
    > ---
    > kernel/smp.c | 2 +-
    > 1 files changed, 1 insertions(+), 1 deletions(-)
    >
    > diff --git a/kernel/smp.c b/kernel/smp.c
    > index 12ed8b0..886a406 100644
    > --- a/kernel/smp.c
    > +++ b/kernel/smp.c
    > @@ -289,7 +289,7 @@ int smp_call_function_single(int cpu, smp_call_func_t func, void *info,
    > * send smp call function interrupt to this cpu and as such deadlocks
    > * can't happen.
    > */
    > - WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
    > + WARN_ON_ONCE(cpu_online(this_cpu) && wait && irqs_disabled()
    > && !oops_in_progress);
    >
    > if (cpu == this_cpu) {

    You just deadlocked the machine.. note how you can still wait on the
    previous csd in csd_lock().


    \
     
     \ /
      Last update: 2010-12-20 17:07    [W:0.021 / U:0.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site