229 Star 835 Fork 386

GVPopenEuler / kernel

 / 详情

EulerOS LTS版本, 虚拟机网卡队列中断

Done
Bug
Opened this issue  
2020-04-01 20:23

使用银河麒麟(内核4.15版本) 通过dpdk(版本17.08), 虚拟机安装openEuler-20.03-LTS-aarch64-dvd.iso版本, qemu版本为4.2. 都是用同一套qemu参数

2 虚拟机启动之, 虚拟网卡有4个队列,openEuler上4个队列共享一个中断, 而用centos7.7作为虚拟机每个队列都有一个中断.

3 从gitee上下载openEuler内核代码,在centos7.7上编译之后也是不正常, 共享一个中断.

4 从kernel.org上下载4.19代码, 编译启动之后,正常,每个队列都有中断.

5 物理机安装eulerosv2r8, qemu为4.0版本, 虚拟机安装openEuler-20.03-LTS版本, 正常, 每个队列都有中断.

正常中断
cat /proc/interrupt
CPU0 CPU1 CPU2 CPU3
3: 1860 1985 1940 2028 GICv3 27 Level arch_timer
36: 378 0 0 0 GICv3 79 Edge virtio4
37: 0 0 0 0 GICv3 33 Level uart-pl011
38: 0 0 0 0 GICv3 23 Level arm-pmu
39: 0 0 0 0 GICv3 36 Level uhci_hcd:usb3
40: 0 0 0 0 GICv3 38 Level uhci_hcd:usb5
41: 0 0 0 0 GICv3 35 Level ehci_hcd:usb2
42: 48 0 0 142 GICv3 37 Level ehci_hcd:usb1, uhci_hcd:usb4
43: 0 0 0 0 ITS-MSI 933888 Edge xhci_hcd
44: 0 0 0 0 ITS-MSI 933889 Edge xhci_hcd
45: 0 0 0 0 ITS-MSI 933890 Edge xhci_hcd
46: 0 0 0 0 ITS-MSI 933891 Edge xhci_hcd
47: 0 0 0 0 ITS-MSI 933892 Edge xhci_hcd
48: 0 0 0 0 ITS-MSI 688128 Edge virtio1-config
49: 3427 0 0 0 ITS-MSI 688129 Edge virtio1-req.0
50: 0 0 0 0 ITS-MSI 819200 Edge virtio2-config
51: 3 0 0 0 ITS-MSI 819201 Edge virtio2-input.0
52: 1 0 0 0 ITS-MSI 819202 Edge virtio2-output.0
53: 0 4 0 0 ITS-MSI 819203 Edge virtio2-input.1
54: 0 10 0 0 ITS-MSI 819204 Edge virtio2-output.1
55: 0 0 2 0 ITS-MSI 819205 Edge virtio2-input.2
56: 0 0 1 0 ITS-MSI 819206 Edge virtio2-output.2
57: 0 0 0 1 ITS-MSI 819207 Edge virtio2-input.3
58: 0 0 0 14 ITS-MSI 819208 Edge virtio2-output.3
59: 0 0 0 0 ITS-MSI 835584 Edge virtio3-config
60: 0 0 0 0 ITS-MSI 835585 Edge virtio3-input.0
61: 0 0 0 0 ITS-MSI 835586 Edge virtio3-output.0
62: 0 0 0 0 ITS-MSI 835587 Edge virtio3-input.1
63: 0 0 0 0 ITS-MSI 835588 Edge virtio3-output.1
64: 0 0 0 0 ITS-MSI 835589 Edge virtio3-input.2
65: 0 0 0 0 ITS-MSI 835590 Edge virtio3-output.2
66: 0 0 0 0 ITS-MSI 835591 Edge virtio3-input.3
67: 0 0 0 0 ITS-MSI 835592 Edge virtio3-output.3
68: 0 0 0 0 ITS-MSI 65536 Edge virtio0-config
69: 56 0 0 0 ITS-MSI 65537 Edge virtio0-virtqueues
IPI0: 3706 4563 5094 4662 Rescheduling interrupts
IPI1: 131 121 118 113 Function call interrupts
IPI2: 0 0 0 0 CPU stop interrupts
IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 0 0 Timer broadcast interrupts
IPI5: 0 0 0 0 IRQ work interrupts
IPI6: 0 0 0 0 CPU wake-up interrupts
Err: 0

异常中断
CPU0 CPU1 CPU2 CPU3
3: 722184 697688 703158 767455 GICv3 27 Level arch_timer
36: 8688 0 0 0 GICv3 79 Edge virtio1
37: 0 0 0 0 GICv3 33 Level uart-pl011
38: 0 0 0 0 GICv3 23 Level arm-pmu
39: 0 0 0 0 GICv3 36 Level uhci_hcd:usb3
40: 0 0 0 0 ITS-MSI 16384 Edge shpchp
41: 43436 0 0 0 GICv3 38 Level shpchp, shpchp, uhci_hcd:usb5, virtio2, virtio3
42: 0 0 0 0 GICv3 35 Level shpchp, ehci_hcd:usb2
43: 396 0 0 0 GICv3 37 Level ehci_hcd:usb1, uhci_hcd:usb4, xhci-hcd:usb6
44: 0 0 0 0 ITS-MSI 65536 Edge virtio0-config
45: 21384 0 0 0 ITS-MSI 65537 Edge virtio0-virtqueues
IPI0: 1187847 918684 1315621 1042385 Rescheduling interrupts
IPI1: 274 215 225 270 Function call interrupts
IPI2: 0 0 0 0 CPU stop interrupts
IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 0 0 Timer broadcast interrupts
IPI5: 0 0 0 0 IRQ work interrupts
IPI6: 0 0 0 0 CPU wake-up interrupts
IPI7: 0 0 0 0 backtrace interrupts
Err: 0

Comments (3)

joukee created缺陷
joukee set related repository to openEuler/kernel
Expand operation logs

Hey @joukee , Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot .
That means the developpers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

ltx set priority to Serious
ltx assigned collaborator XieXiuQi
ltx unassigned collaborator XieXiuQi

please make sure if this happen or not on openEuler 4.19 kernel.

Alex_Chao set assignee to Alex_Chao
Alex_Chao changed description
Alex_Chao added
 
sig/kernel
label

qemu启动内核有两种方式,一种是UEFI方式, 为推荐使用方式,另外一种是通过DTS方式
通过定位问题发现, centos7.7 是使用UEFI启动方式, openEuler是DTS方式
继续跟踪内核源码 arch/arm64/kernel/apci.c 中在函数param_acpi_on变量的赋值在centos与openEuler上不一样

void __init acpi_boot_table_init(void)
{
/*
* Enable ACPI instead of device tree unless
* - ACPI has been disabled explicitly (acpi=off), or
* - the device tree is not empty (it has more than just a /chosen node,
* and a /hypervisor node when running on Xen)
* and ACPI has not been [force] enabled (acpi=on|force)
*/
if (param_acpi_off ||
(!param_acpi_on && !param_acpi_force &&
of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
goto done;

    /*
     * ACPI is disabled at this point. Enable it in order to parse
     * the ACPI tables and carry out sanity checks
     */
    enable_acpi();

...
}

变量param_acpi_on定义
openEuler OS(linux4.19): static bool param_acpi_on __initdata;
centos7.7(linux4.18) static bool param_acpi_on __initdata = true;

查看了kernel.org 4.18内核版本上param_acpi_on并没有赋值为true, 这块主要是centos自己的修改

结论:
为了启动虚拟机统一, 建议qemu在启动时加上配置参数 acpi=on
PS:
upstream kernel 4.19 内核为什么正常?
编译4.19内核时, 使用了centos7.7的内核配置选项,关闭了CONFIG_HOTPLUG_PCI_SHPC

Alex_Chao changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
Confirm
参与者(4)
5329419 openeuler ci bot 1632792936
C
1
https://toscode.gitee.com/openeuler/kernel.git
git@toscode.gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

Search

161121 f78d6d6f 1850385 154831 86f8c370 1850385