Re: [PATCH][4/6]Register snapshotting before kexec boot

From: Andrew Morton
Date: Wed Sep 15 2004 - 19:37:42 EST


Hariprasad Nellitheertha <hari@xxxxxxxxxx> wrote:
>
> +void __crash_dump_stop_cpus(void)
> +{
> + int i, cpu = smp_processor_id();
> + int other_cpus = num_online_cpus()-1;
> +
> + if (other_cpus > 0) {
> + atomic_set(&waiting_for_dump_ipi, other_cpus);
> +
> + for (i = 0; i < NR_CPUS; i++)
> + crash_dump_expect_ipi[i] = (i != cpu && cpu_online(i));
> +
> + set_nmi_callback(crash_dump_nmi_callback);
> + /* Ensure the new callback function is set before sending
> + * out the IPI
> + */
> + wmb();
> +
> + crash_dump_send_ipi();
> + while (atomic_read(&waiting_for_dump_ipi) > 0)
> + cpu_relax();
> +
> + unset_nmi_callback();
> + } else {
> + local_irq_disable();
> + disable_local_APIC();
> + local_irq_enable();
> + }
> +}

Is dodgy wrt CPU hotplug, but there's not a lot we can do about that
in this context, I expect. Which is a shame, given that CPU hotplug
is a likely time at which to be taking a crashdump ;)

Rusty, you may like to review these patches...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/