Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ben Woodard <woodard@...>
Cc: Eric W. Biederman <ebiederm@...>, Andi Kleen <ak@...>, Neil Horman <nhorman@...>, <kexec@...>, <linux-kernel@...>, <hbabu@...>, <vgoyal@...>
Date: Tuesday, November 27, 2007 - 3:42 pm

On Tue, Nov 27, 2007 at 10:41:15AM -0800, Ben Woodard wrote:

Ben I tend to agree.  I think re-enabling the APIC early in the boot process
provides a greater degree of reliability in that it more quickly restores the
system to a state where booting on a cpu other than cpu0 will be more likely to
work, but I have to say that overall it seems like booting a secondary kernel on
cpu0, when possible offers the highest degree of reliability.

Perhaps what we need is a 'both solution'.  Re-enabling the apic to full smp
functionality early in the boot process is a good solution for the problems
which we are hypothesizing here, and would be a good thing to do in general, but
it doesn't preclude also attmpting to switch back to cpu0 during a crash.

Perhaps it would be worthwhile to:

1) Investigate the early enablement of the ioapic for x86[_64]
2) implement my prevoiusly proposed patch with the addition of a handshake
element, such that:
	a) when the boot cpu gets the ipi from machine_crash_shutdown it flags
	   the fact that it is going to boot the kexec kernel with a global
	   variable
	b) the crashing cpu loops waiting for either:
		I) a timeout of 1 second
		II) a reduction of the halt count to zero
		III) the setting of the flag mentioned in (a)
	c) the crashing cpu, if it sees that it is not the boot cpu AND
	   that the flag in (III) is set, will halt itself, otherwise it
	   will set the flag and boot the kexec image itself.

With this modification, we can try to relocate to cpu0,  and if we fail, we fall
back to booting on the crashing processor.

I'll work up a patch that implements (2), unless there are strong objections.  I
see no reason why we can't implment this 'both' solution.

Regards
Neil

-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@redhat.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 12:12 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 9:28 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 10:56 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Neil Horman, (Tue Nov 27, 3:42 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Wed Nov 28, 1:36 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Wed Nov 28, 3:42 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Thu Nov 29, 10:54 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Wed Nov 28, 7:27 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Mon Dec 10, 9:08 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Dec 11, 12:48 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Dec 11, 11:29 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Dec 11, 2:46 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Wed Dec 12, 3:43 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Wed Dec 12, 5:32 pm)
Re: [PATCH] k8: Enable legacy irqs with extended cpu ids, Eric W. Biederman, (Wed Dec 12, 4:43 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Mon Dec 10, 9:17 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 11:30 am)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 6:38 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 8:15 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 8:43 pm)
Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels..., Eric W. Biederman, (Tue Nov 27, 7:19 am)