于 2014/4/28 21:30, Dave Anderson 写道: > > > ----- Original Message ----- >> 于 2014/4/27 7:43, Dave Anderson 写道: >>> >>> >>> ----- Original Message ----- >>>> On 2014/4/26 3:20, Dave Anderson wrote: >>>>> >>>>> >>>>> ----- Original Message ----- >>>>>> For ARM32 platfrom, The system will "offline" all CPUs except the >>>>>> crashing one, by clear the cpu_online_mask. So we need to find >>>>>> another way to get online-CPUs number for crash utility. >>>>>> >>>>>> This patch uses cpu_active_mask to get that value. >>>>>> >>>>>> Signed-off-by: Liu Hua <sdu.liu@xxxxxxxxxx> >>>>>> --- >>>>>> arm.c | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/arm.c b/arm.c >>>>>> index 3c38cd5..c94d7bf 100644 >>>>>> --- a/arm.c >>>>>> +++ b/arm.c >>>>>> @@ -1518,7 +1518,7 @@ arm_display_machine_stats(void) >>>>>> static int >>>>>> arm_get_smp_cpus(void) >>>>>> { >>>>>> - return get_cpus_online(); >>>>>> + return get_cpus_active(); >>>>>> } >>>>>> >>>>>> /* >>>>> >>>>> When did this start happening? I ask because no other ARM users have >>>>> reported this until now. I've only got one sample SMP vmcore, and >>>>> clearly the non-crashing cpu was not offlined: >>>>> >>>> >>>> >>>> Hi Dave, >>>> >>>> commit 36a2e5010fe87 "kexec: offline non panic CPUs on Kdump panic " >>>> introduces this change. <v3.10.27-1-g36a2e50> >>>> >>>> The following messges come from the ARM boards on my hand. The crash >>>> utility has added my patchs. >>>> >>>> (1) ARM A15 16 CPUs >>>> >>>> crash> sys >>>> >>>> KERNEL: vmlinux >>>> DUMPFILE: vmcore_my [PARTIAL DUMP] >>>> CPUS: 16 >>>> DATE: Fri Feb 28 10:07:55 2014 >>>> UPTIME: 00:03:57 >>>> LOAD AVERAGE: 0.03, 0.01, 0.01 >>>> TASKS: 140 >>>> NODENAME: arma15el >>>> RELEASE: 3.10.37+ >>>> VERSION: #2 SMP Thu Apr 24 21:13:28 CST 2014 >>>> MACHINE: armv7l (unknown Mhz) >>>> MEMORY: 3.1 GB >>>> PANIC: "Internal error: Oops: a07 [#1] SMP ARM" (check log for >>>> details >>>> >>>> crash> help -k >>>> .... >>>> cpu_possible_map: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >>>> cpu_present_map: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >>>> cpu_online_map: 0 >>>> ... >>>> >>>> >>>> (2) ARM A9 4 CPUs >>>> >>>> crash> sys >>>> KERNEL: vmlinux >>>> DUMPFILE: vmcore >>>> CPUS: 2 >>>> DATE: Mon Apr 14 11:09:10 2014 >>>> UPTIME: 00:06:17 >>>> LOAD AVERAGE: 0.16, 0.05, 0.02 >>>> TASKS: 45 >>>> NODENAME: arma9el >>>> RELEASE: 3.10.37+ >>>> VERSION: #6 SMP Tue Apr 22 13:23:30 CST 2014 >>>> MACHINE: armv7l (unknown Mhz) >>>> MEMORY: 1.5 GB >>>> PANIC: "Internal error: Oops: 817 [#1] SMP ARM" (check log for >>>> details) >>>> >>>> crash> help -k >>>> .... >>>> cpu_possible_map: 0 1 >>>> cpu_present_map: 0 1 >>>> cpu_online_map: 1 >>>> >>>> >>>> crash> p per_cpu__runqueues >>>> >>>> PER-CPU DATA TYPE: >>>> struct rq runqueues; >>>> PER-CPU ADDRESSES: >>>> [0]: c069a680 >>>> [1]: c06a2680 >>>> >>>> With my patches, "sys" command is ok. And I can get per_cpu variables >>>> correctly. >>>> But something should be done for "help -k". May be I should add fully >>>> support >>>> for cpu_active_mask. If necessory, I will resend this patch series. >>> >>> It's not necessary, but it would be nice to have, and would be >>> easy to add. >>> >>> Also, would it be possible that you can let me have a copy of your >>> 16-cpu vmlinux/vmcore pair? That would be a great sample for >>> my testing. >>> >>> Thanks, >>> Dave >> >> Hi Dave, >> >> Sure, there seems no extra problems caused by the commit above. We can add it >> when necessory. > > Will you be re-posting the original patch? (with or without the help -k support) I will repost patches soon, with help -k support. > >> >> And, I am very sorry to tell you that I have no authority for sending binary files out of my >> company, becasue of it's security rules. I have no ways to send that huge file out. Maybe >> I can do some test for you on my platform. > > OK I understand. > > Thanks, > Dave > > . > -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility