lkml.org 
[lkml]   [2014]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU
From
Date
On Fri, 2014-05-16 at 01:04 +0530, Srivatsa S. Bhat wrote:
> On 05/16/2014 12:49 AM, Joe Perches wrote:
> > On Fri, 2014-05-16 at 00:43 +0530, Srivatsa S. Bhat wrote:
> >> Today the smp-call-function code just prints a warning if we get an IPI on
> >> an offline CPU. This info is sufficient to let us know that something went
> >> wrong, but often it is very hard to debug exactly who sent the IPI and why,
> >> from this info alone.
> > []
> >> diff --git a/kernel/smp.c b/kernel/smp.c
> > []
> >> @@ -185,14 +185,26 @@ void generic_smp_call_function_single_interrupt(void)
> > []
> >> - entry = llist_del_all(&__get_cpu_var(call_single_queue));
> >> - entry = llist_reverse_order(entry);
> >> + /*
> >> + * We don't have to use the _safe() variant here
> >> + * because we are not invoking the IPI handlers yet.
> >> + */
> >> + llist_for_each_entry(csd, entry, llist)
> >> + pr_warn("IPI callback %pS sent to offline CPU\n",
> >> + csd->func);
> >
> > Perhaps add ratelimited?
> >
>
> This entire scenario is expected to be _very_ infrequent, and even if
> it happens, these prints will appear only once during the entire run
> (note the use of the 'warned' variable to control that). So I don't think
> ratelimiting is called for in this case.

Ah, good.

I was misled a bit by the WARN_ONCE that is in the
same block. Perhaps because there is a guard flag
above the block, maybe the WARN_ONCE should just be
WARN.




\
 
 \ /
  Last update: 2014-05-15 22:21    [W:0.140 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site