• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 12157955901
78%
master: 80%

Build:
Build:
LAST BUILD BRANCH: private/changleli/fix-xenops-cache
DEFAULT BRANCH: master
Ran 04 Dec 2024 10:37AM UTC
Jobs 1
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Dec 2024 10:36AM UTC coverage: 78.273%. Remained the same
12157955901

push

github

web-flow
CA-388564: move qemu-dm to vm.slice (#6150)

This is a single line change to move qemu to the proper cgroup.

Qemu moves itself to the root cgroup, which makes it a sibling of
control.slice. All toolstack processes are in control.slice, and even
though control.slice gets 10x share of CPU, if we have 1000 qemu
processes there is still a big imbalance (toolstack gets 10/1010 share
of the CPU)

Qemu-wrapper already has the ability to move the process to another
cgroup, so use it. tapdisk and qemu-datapath are already in vm.slice, so
move qemu-dm there too.

Checked that qemu ends up in the correct slice:
```
cat /proc/$(pgrep qemu-dm\*|head -n1)/cgroup
8:memory:/vm.slice
7:blkio:/vm.slice
6:net_cls,net_prio:/
5:freezer:/
4:cpu,cpuacct:/vm.slice
3:cpuset:/
2:devices:/
1:name=systemd:/vm.slice/qemu-datapath@199.service
```

Tested with a script that control.slice and vm.slice are indeed properly
limiting CPU usage, and control.slice gets the expected share of CPU
even when vm.slice has a lot more processes:
```
#!/bin/bash
set -eu

# $$ is the pid of the main shell
# Need to use $BASHPID to get pid of subshell

for SLICE in system.slice control.slice vm.slice; do
	for i in $(seq 1 16); do
		(echo $BASHPID >/sys/fs/cgroup/cpu,cpuacct/${SLICE}/tasks; while true; do echo -n; done)&
	done
done

for i in $(seq 17 1000); do
	(echo $BASHPID >/sys/fs/cgroup/cpu,cpuacct/vm.slice/tasks; while true; do echo -n; done)&
done
```

```
329178 root      20   0  113216    216     16 R  92.4  0.0   0:07.50 bash
 329171 root      20   0  113216    216     16 R  84.4  0.0   0:07.05 bash
 329177 root      20   0  113216    216     16 R  84.4  0.0   0:06.97 bash
 329170 root      20   0  113216    216     16 R  84.1  0.0   0:06.65 bash
 329180 root      20   0  113216    216     16 R  84.1  0.0   0:06.94 bash
 329183 root      20   0  113216    220     16 R  81.8  0.0   0:06.93 bash
 329174 root      20   0  113216    216    ... (continued)

3462 of 4423 relevant lines covered (78.27%)

0.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 12157955901.1 04 Dec 2024 10:37AM UTC 37
78.27
GitHub Action Run
Source Files on build 12157955901
  • Tree
  • List 37
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12157955901
  • 59da2e0f on github
  • Prev Build on feature/perf (#12138621224)
  • Next Build on feature/perf (#12258746962)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc