zegelin / qemu-affinity Goto Github PK
View Code? Open in Web Editor NEWqemu-affinity is a tool to easily pin certain QEMU threads to select CPU cores
qemu-affinity is a tool to easily pin certain QEMU threads to select CPU cores
I'm having problem using the script with -k option.
qemu command line :
ExecStart=/usr/bin/qemu-system-x86_64 -daemonize -name %i,debug-threads=on -pidfile /run/qemu_%i.pid -monitor unix:/tmp/%i.sock,server,nowait,nodelay $args
args contain this smp definition: -smp sockets=1,cores=12,threads=1
(note: hyperthreading doesn't work on ryzen/qemu actual version so i'm sticking with single core/threads )
ExecStartPost=/bin/sh -c 'exec /usr/local/bin/qemu-affinity $MAINPID -p 0-1 -i *:0-1 -q 0-1 -w *:0-1 -k 4 5 6 7 8 9 10 11 12 13 14 15'
cpus from 4 to 15 are isolated through isolcpus parameter in kernel.
Journalctl :
Traceback (most recent call last):
lug 17 09:54:11 ryzensrv sh[9839]: File "/usr/local/bin/qemu-affinity", line 11, in
lug 17 09:54:11 ryzensrv sh[9839]: load_entry_point('qemu-affinity==1.0.0', 'console_scripts', 'qemu-affinity')()
lug 17 09:54:11 ryzensrv sh[9839]: File "/usr/local/lib/python3.6/site-packages/qemu_affinity.py", line 239, in main
lug 17 09:54:11 ryzensrv sh[9839]: parser.error('argument %s: too many positional affinity specifications (%d threads, %d provided).' % (argparse._get_action_name(arg), len(threads), spec_count))
lug 17 09:54:11 ryzensrv sh[9839]: TypeError: object of type 'filter' has no len()
By default, running qemu-affinity on Linux Mint 19 gets a generic error:
Traceback (most recent call last):
File "/usr/local/bin/qemu-affinity", line 7, in <module>
from qemu_affinity import main
File "/home/haruka/.local/lib/python2.7/site-packages/qemu_affinity.py", line 4, in <module>
from pathlib import Path
ImportError: No module named pathlib
This is because python 2.7 is the default. qemu-affinity should check the version string before using it, and check for a python3
binary if the python
version is not 3 already.
$ python --version
Python 2.7.15rc1
$ python3 --version
Python 3.6.5
However, even setting the opening line of the script to #!/usr/bin/python3
then we still get an error:
$ qemu-affinity --help
Traceback (most recent call last):
File "/usr/local/bin/qemu-affinity", line 7, in <module>
from qemu_affinity import main
ModuleNotFoundError: No module named 'qemu_affinity'
But I'm unsure as to why its throwing this error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.