From: "Aaron Lu" <ziqianlu@bytedance.com>
To: "chenjinghuang" <chenjinghuang2@huawei.com>
Cc: "Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>,
"Mel Gorman" <mgorman@suse.de>,
"Valentin Schneider" <vschneid@redhat.com>,
"K Prateek Nayak" <kprateek.nayak@amd.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [Question] Userspace throttling + "sched/fair: Combine detach into dequeue when migrating task" causes guest boot hang
Date: Thu, 27 Aug 2026 19:16:36 +0800 [thread overview]
Message-ID: <20260827111557.GB3616635@bytedance.com> (raw)
In-Reply-To: <bc90cc67-93d0-463c-adf9-53b00a932d56@huawei.com>
On Thu, Aug 27, 2026 at 11:36:33AM +0800, chenjinghuang wrote:
> On 8/26/2026 6:00 PM, Aaron Lu wrote:
> > On Tue, Aug 25, 2026 at 12:06:29PM +0000, Chen Jinghuang wrote:
> >> Hi, I'm seeing a VM boot hang on mainline, and I'd like to understand the
> >> interaction between userspace throttling and the scheduler patch
> >> "e1f078f50478 sched/fair: Combine detach into dequeue when migrating
> >> task".
> >>
> >> Host:
> >> aarch64, 96 CPUs (0-95), 4 NUMA nodes:
> >> node0: 0-23, node1: 24-47, node2: 48-71, node3: 72-95
> >> Mainline kernel tag: 7.2-rc1.
> >>
> >> Guest(libvirt/KVM) - described in words:
> >> An aarch64 (virt-6.2) UEFI VM launched with `virsh create`; key config:
> >>
> >> - 128 vCPUs (statically placed, oversubscribed — the host has only 96
> >> physical CPUs).
> >> - host-passthrough CPU model; GICv3; 64 GiB RAM.
> >> - <cputune> has <global_quota> set to 400000; all <vcpupin> and
> >> <emulatorpin> entries are commented out, so there is no vCPU pinning.
> >> - Storage: qcow2 on virtio-scsi (cache=none, io=native). HPET disabled.
> >>
> >> Userspace throttling:
> >> The VM runs under a CPU-quota cap applied on the host. The actual values
> >> from the cgroup controller are:
> >>
> >> cpu.cfs_period_us = 100000
> >> cpu.cfs_quota_us = 400000
> >>
> >> I also found that if I set cpu.cfs_quota_us to -1, or enlarge it beyond a
> >> certain point, the guest boots fine.
> >>
> >> Symptom:
> >> The guest hangs at some command early in boot and never reaches the login
> >> prompt.
> >>
> >
> > I tried this on an x86 machine with v7.2-rc1 kernel and with quota set
> > to 4 cpus, the VM booted fine; when I further reduced quota to 1 cpu, the
> > guest kernel would dump a ton of soft lockups during boot. I also tried
> > running an old 5.10 kernel(which doesn't have per-task throttle) and it
> > behaved the same as v7.2-rc1.
> >
> > The x86 machine has 64cores/128cpus and the VM I created has 128cpus and
> > 128G memory.
> >
> My host is an ARM64 machine without SMT, so 96 physical cores correspond to
> 96 logical CPUs. The VM is configured with 128 vCPUs, which is indeed a typical
> CPU oversubscription scenario. In my machine, if I configure the VM with 96 vCPUs,
> the issue don't occur either.
>
OK, so this looks like it has something to do with the task number. More
vCPUs translated to more qemu threads and that caused your guest boot
hang. I think there should be softlockup dumps in your case, is it that
the softlockup detector is not enabled in your guest kernel config?
With this said, I increased vCPU to 256 on this 64core/128cpus Intel host
to see if I can reproduce this. With 4 cpus quota, it managed to boot
the guest. There are several softlockups during boot though and that is
an indication the qemu task is in need of cpu time. I can imagine if I
increase the vCPU number even more or reduce the quota further, it will
eventually hang the guest with tons of softlockup msgs.
next prev parent reply other threads:[~2026-08-27 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 12:06 Chen Jinghuang
2026-08-25 13:15 ` K Prateek Nayak
2026-08-26 8:26 ` chenjinghuang
2026-08-26 10:00 ` Aaron Lu
2026-08-27 3:36 ` chenjinghuang
2026-08-27 11:16 ` Aaron Lu [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-25 11:55 Chen Jinghuang
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=20260827111557.GB3616635@bytedance.com \
--to=ziqianlu@bytedance.com \
--cc=bsegall@google.com \
--cc=chenjinghuang2@huawei.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®