On Mon, Feb 24, 2014 at 10:38:00AM +0800, Baoquan He wrote:
On 02/20/14 at 06:09pm, Jerry Hoemann wrote:
> == Version 2 ==
>
> +#
> +# This function returns the "initial apicid" of the
> +# boot cpu (cpu 0) if present.
> +#
> +function get_bootcpu_initial_apicid()
> +{
> + awk ' \
> + BEGIN { CPU = "-1"; } \
> + $1=="processor" && $2==":" { CPU = $NF; } \
> + CPU=="0" && /initial apicid/ { print $NF; } \
> + ' \
> + /proc/cpuinfo
Hi Jerry,
How does it go with virtual machine? I didn't find the "initial apicid"
on my kvm guest.
Baoquan
Thanks
Hi Baoquan,
Without "initial apicid" the awk script will not match and a
"disable_cpu_apicid=N" arguement won't be passed to the crash
kernel.
This is actually good as the assumption that "CPU 0 == bsp" wouldn't
hold in a virutal environment.
Howerver, this does mean that a kvm instance might still have difficultly
specifying nr_cpus > 1 for crash kernel.
Longer term we should look into having something more explicit exported
to user space saying which CPU is ths bsp. I know Vivek has mentioned
this previously. If this information was available in both real hardware
and virtual system, the above test could be modified.
Thanks for your feedback.
Jerry
--
----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett-Packard
3404 E Harmony Rd. MS 57 phone: (970) 898-1022
Ft. Collins, CO 80528 FAX: (970) 898-XXXX
email: jerry.hoemann(a)hp.com
----------------------------------------------------------------------------