lkml.org 
[lkml]   [2020]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] powerpc/crash: Use NMI context for printk after crashing other CPUs
From
Date
On Wed, 2020-04-08 at 22:13 +1000, Michael Ellerman wrote:
[...]
> Added context:
>
> printk(KERN_EMERG "Sending IPI to other CPUs\n");
>
> if (crash_wake_offline)
> ncpus = num_present_cpus() - 1;
>
> >
> > crash_send_ipi(crash_ipi_callback);
> > smp_wmb();
> > + printk_nmi_enter();
>
> Why did you decide to put it there, rather than at the start of
> default_machine_crash_shutdown() like I did?
>
> The printk() above could have already deadlocked if another CPU is stuck
> with the logbuf lock held.

Oh, I thought the CPUs would start crashing after crash_send_ipi(), so
only printk() after that would possibly deadlock.

I was not able to see how the printk() above would deadlock, but I see
no problem adding that at the start of the function.

Best regards,
Leonardo Bras
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-04-08 20:42    [W:0.029 / U:2.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site