[Crash-utility] FW: Number of cpus on ARM

Karlsson, Jan Jan.Karlsson at sonymobile.com
Wed Oct 15 09:19:59 UTC 2014


Hi

Unfortunately I found another older example where my patch below did not work.
In that one only cpu 0 where online but 0,1,2,3 where active. So maybe:

                           return MAX(get_cpus_active(), get_highest_cpu_online()+1);

might work better. Someone with better knowledge about this than I have should look at the problem.

Jan

Jan Karlsson
Senior Software Engineer
System Assurance

Sony Mobile Communications
Tel: +46 703 062 174
jan.karlsson at sonymobile.com<mailto:Firstname.Lastname at sonymobile.com>

sonymobile.com<http://sonymobile.com/>

[cid:image001.gif at 01CFE865.529F8280]

From: Karlsson, Jan
Sent: den 15 oktober 2014 10:49
To: Discussion list for crash utility usage, maintenance and development
Subject:

Hi

I have seen a problem when it comes to the number of cpus for ARM (32-bits).

static int
arm_get_smp_cpus(void)
{
                           return MAX(get_cpus_active(), get_cpus_online());
}

In one of my example, "help -k" gives me:
       cpu_possible_map: 0 1 2 3
        cpu_present_map: 0 1 2 3
         cpu_online_map: 0 3
         cpu_active_map: 3

So the number of cpus will become 2. However there are code in a number of places that will then only accept cpu 0 and 1 as cpus to handle.

When I changed to code to be the same as for ARM64 things worked as expected:

static int
arm_get_smp_cpus(void)
{
                           return MAX(get_cpus_online(), get_highest_cpu_online()+1);
}

Jan

Jan Karlsson
Senior Software Engineer
System Assurance

Sony Mobile Communications
Tel: +46 703 062 174
jan.karlsson at sonymobile.com<mailto:Firstname.Lastname at sonymobile.com>

sonymobile.com<http://sonymobile.com/>

[cid:image001.gif at 01CFE865.529F8280]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20141015/021e1c4e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1749 bytes
Desc: image001.gif
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20141015/021e1c4e/attachment.gif>


More information about the Crash-utility mailing list