From: Gonglei <arei.gonglei@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
"benoit@irqsave.net" <benoit@irqsave.net>,
"wangxin (U)" <wangxinxin.wang@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"Herongguang (Stephen)" <herongguang.he@huawei.com>
Subject: Re: [Qemu-devel] [BUG] Redhat-6.4_64bit-guest kernel panic with cpu-passthrough and guest numa
Date: Fri, 28 Nov 2014 10:38:17 +0800 [thread overview]
Message-ID: <5477E019.6090408@huawei.com> (raw)
In-Reply-To: <54775D4A.8080709@redhat.com>
On 2014/11/28 1:20, Paolo Bonzini wrote:
>
> On 27/11/2014 14:00, Gonglei (Arei) wrote:
>>> >>
>>> >> Running a redhat-6.4-64bit (kernel 2.6.32-358.el6.x86_64) or elder guest on
>>> >> qemu-2.1, with kvm enabled and -cpu host, non default cpu-topology and guest
>>> >> numa
>>> >> I'm seeing a reliable kernel panic from the guest shortly after boot. It is
>>> >> happening in
>>> >> find_busiest_group().
>>> >>
>>> >> We also found it happend since commit
>>> >> 787aaf5703a702094f395db6795e74230282cd62 by git bisect.
>>> >>
>>> >> The reproducer:
>>> >>
>>> >> (1) full qemu cmd line:
>>> >> qemu-system-x86_64 -machine pc-i440fx-2.1,accel=kvm,usb=off \
>>> >> -cpu host -m 16384 \
>>> >> -smp 16,sockets=2,cores=4,threads=2 \
>>> >> -object memory-backend-ram,size=8192M,id=ram-node0 \
>>> >> -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
>>> >> -object memory-backend-ram,size=8192M,id=ram-node1 \
>>> >> -numa node,nodeid=1,cpus=8-15,memdev=ram-node1 \
>>> >> -boot c -drive file=/data/wxin/vm/redhat_6.4_64 \
>>> >> -vnc 0.0.0.0:0 -device
>>> >> cirrus-vga,id=video0,vgamem_mb=8,bus=pci.0,addr=0x1.0x4 \
>>> >> -msg timestamp=on
>>> >>
>>> >> (2)the guest kernel messages:
> Can you find what line of kernel/sched.c it is?
Yes, of course. See below please:
"sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power; "
in update_sg_lb_stats(), file sched.c, line 4094
And I can share the cause of we found. After commit 787aaf57(target-i386:
forward CPUID cache leaves when -cpu host is used), guest will get cpu cache
from host when -cpu host is used. But if we configure guest numa:
node 0 cpus 0~7
node 1 cpus 8~15
then the numa nodes lie in the same host cpu cache (cpus 0~16).
When the guest os boot, calculate group->cpu_power, but the guest find thoes
two different nodes own the same cache, then node1's group->cpu_power
will not be valued, just is the initial value '0'. And when vcpu is scheduled,
division by 0 causes kernel panic.
Regards,
-Gonglei
next prev parent reply other threads:[~2014-11-28 2:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 13:00 [Qemu-devel] [BUG] Redhat-6.4_64bit-guest kernel panic with cpu-passthrough and guest numa Gonglei (Arei)
2014-11-27 17:20 ` Paolo Bonzini
2014-11-28 2:38 ` Gonglei [this message]
2014-12-01 9:48 ` Paolo Bonzini
2014-12-02 3:41 ` Gonglei
2014-12-02 3:43 ` Gonglei
-- strict thread matches above, loose matches on Subject: below --
2014-11-27 12:58 Gonglei (Arei)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5477E019.6090408@huawei.com \
--to=arei.gonglei@huawei.com \
--cc=benoit@irqsave.net \
--cc=herongguang.he@huawei.com \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.