[PATCH 1/2] kexec: add a dummy note for each offline cpu

Liu ping fan kernelfans at gmail.com
Wed Dec 14 00:56:14 PST 2016

On Wed, Dec 14, 2016 at 4:48 PM, Xunlei Pang <xpang at redhat.com> wrote:
> On 12/14/2016 at 02:11 PM, Pingfan Liu wrote:
>> kexec-tools always allocates program headers for each possible cpu. This
>> incurs zero PT_NOTE for offline cpu. We mark this case so that later,
>> the capture kernel can distinguish it from the mistake of allocated
>> program header.
>> The counterpart of the capture kernel comes in next patch.
> Hmm, we can initialize the cpu crash note buf in crash_notes_memory_init(), needless
> to do it at the crash moment, right?
The cpus can be on-off-on.., We can not know the user's action.

> BTW, does this cause any issue, for example the crash utility can't parse the vmcore
> properly? or just reproduce lots of warnings after offline multiple cpus?
No. This patch just place a mark on these offline cpu. The next patch
for capture kernel will recognize this case, and ignore this kind of
pt_note by the code:
real_sz = 0; // although the size of this kind of PT_NOTE is not zero,
but it contains nothing useful, so just ignore it
phdr_ptr->p_memsz = real_sz


More information about the kexec mailing list