From: Kunkun Jiang <jiangkunkun@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>
Cc: "open list:IRQ SUBSYSTEM" <linux-kernel@vger.kernel.org>,
"moderated list:ARM SMMU DRIVERS"
<linux-arm-kernel@lists.infradead.org>, <kvmarm@lists.linux.dev>,
"wanghaibin.wang@huawei.com" <wanghaibin.wang@huawei.com>,
<nizhiqiang1@huawei.com>,
"tangnianyao@huawei.com" <tangnianyao@huawei.com>,
<wangzhou1@hisilicon.com>
Subject: [bug report] GICv4.1: multiple vpus execute vgic_v4_load at the same time will greatly increase the time consumption
Date: Wed, 21 Aug 2024 17:51:27 +0800 [thread overview]
Message-ID: <a7fc58e4-64c2-77fc-c1dc-f5eb78dbbb01@huawei.com> (raw)
Hi all,
Recently I discovered a problem about GICv4.1, the scenario is as follows:
1. Enable GICv4.1
2. Create multiple VMs.For example, 50 VMs(4U8G)
3. The business running in VMs has a frequent mmio access and need to exit
to qemu for processing.
4. Or modify the kvm code so that wfi must trap to kvm
5. Then the utilization of pcpu where the vcpu is located will be 100%,and
basically all in sys.
6. This problem does not exist in GICv3.
According to analysis, this problem is due to the execution of vgic_v4_load.
vcpu_load or kvm_sched_in
kvm_arch_vcpu_load
...
vgic_v4_load
irq_set_affinity
...
irq_do_set_affinity
raw_spin_lock(&tmp_mask_lock)
chip->irq_set_affinity
...
its_vpe_set_affinity
The tmp_mask_lock is the key. This is a global lock. I don't quite
understand
why tmp_mask_lock is needed here. I think there are two possible
solutions here:
1. Remove this tmp_mask_lock
2. Modify the gicv4 driver,do not perfrom VMOVP via irq_set_affinity.
Everyone is welcome to discuss.
Thanks,
Kunkun Jiang
next reply other threads:[~2024-08-21 9:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 9:51 Kunkun Jiang [this message]
2024-08-21 10:59 ` Marc Zyngier
2024-08-21 18:23 ` Kunkun Jiang
2024-08-22 8:26 ` Marc Zyngier
2024-08-22 10:59 ` Kunkun Jiang
2024-08-22 12:47 ` Marc Zyngier
2024-08-22 21:20 ` Thomas Gleixner
2024-08-23 8:49 ` Marc Zyngier
2024-08-26 3:10 ` Kunkun Jiang
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=a7fc58e4-64c2-77fc-c1dc-f5eb78dbbb01@huawei.com \
--to=jiangkunkun@huawei.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=nizhiqiang1@huawei.com \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=tangnianyao@huawei.com \
--cc=tglx@linutronix.de \
--cc=wanghaibin.wang@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=yuzenghui@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®