You are not logged in.

#3276 2014-11-16 20:42:50

orcephrye
Member
Registered: 2014-11-15
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

sinyy wrote:

so, basically you did NO basic tuning

Actually... I troubleshooted the sound bit quite a lot. First I removed all sound devices to see if it would have an effect. That became my control environment for sound. I found that the FPS in two different games increase by roughly 2 or 3... *sarcastic woo*...  I figured I continue to mess around. I had a sound card. I passed that PCI device through and it worked awesomely. Except no improvements. In the end I found that the default sound emulation will work mostly fine. Except for the aforementioned problem. I asked about it because I do not want to have to use separate speakers (or some funky mixer) and if other people don't have to perhaps there is something I can due to tweak it.  I also switched between pulse audio and direct with ALSA. In fact I did a lot of s*** but I didn't explain in detail my whole troubleshooting history. Thats not how you open a conversation for help. I stated what the environment is and what i am currently doing as a starting place.

What about hugetlbfs... well did that too. No effect. What about compiling the kernel with the voluntary... did that too.. no effect.

One thing I didn't due was CPU pinning. I left that alone because I saw other people didn't have there settings adjusted. And I figured that it likely not improve performance much. I done stuff like that before  with little effect.

It is true that I haven't read all 131 pages of this forum. But it is also true that I never expected the performance to be 100% like bare metal. (nor did I type that) In fact I deal with that on a daily basis because I work on OpenStack for customers who always complain about this or that performance wise. My question was how much of a performance drop *should* I expect. Should it be ~30 % or 10 or what? And from what I am hearing it probably shouldn't be this low.


And Duelist... what hardware is that? AMD or Intel biased?

Offline

#3277 2014-11-16 21:09:14

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:

And Duelist... what hardware is that? AMD or Intel biased?

FM2-socket based AMD.
Asus F2A55+Athlon X4 750K Trinity(there is a richland-based version).


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3278 2014-11-16 21:28:28

orcephrye
Member
Registered: 2014-11-15
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
orcephrye wrote:

And Duelist... what hardware is that? AMD or Intel biased?

FM2-socket based AMD.
Asus F2A55+Athlon X4 750K Trinity(there is a richland-based version).

*sigh* So an AMD based. Wait.. sorry to ask more but is the card Radeon or Nvidia?

I got an old Radeon 5770. I am thinking of benchmarking it bare metal and then replacing my 670 to see how it fairs in the KVM and also in Xen. I hope that I only get about 10 or 15% reduction. That seams to align with what I have seen online. If that works out then I will probably by a Radeon 290x and sell my Nvidia 670 for a 100 bucks or something. :-)

Offline

#3279 2014-11-16 21:50:01

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Trying OVMF, compiled it from github and I can't get Windows 8.1 to install. Once I got it till end of the first phase but when It started to "copy files 1 out of 5?" it said it cant continue. Compiled again OVMF and now I cannot for gods sake get the DVD to boot properly. "press anything to boot" > I press > windows logo shows with spinning > reboot instantly and Im in a never ending loop. Whats the problem?

Also from Gerd's repo edk2.git-ovmf-x64 is not available anymore??

Last edited by devianceluka (2014-11-16 21:51:27)

Offline

#3280 2014-11-16 21:56:39

4kGamer
Member
Registered: 2014-10-29
Posts: 88

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

you can use ovmf-svn https://aur.archlinux.org/packages/ovmf-svn/

nbhs also built it from git. You can get it on Page 126, here in the thread.

Offline

#3281 2014-11-16 21:58:20

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:
Duelist wrote:
orcephrye wrote:

And Duelist... what hardware is that? AMD or Intel biased?

FM2-socket based AMD.
Asus F2A55+Athlon X4 750K Trinity(there is a richland-based version).

*sigh* So an AMD based. Wait.. sorry to ask more but is the card Radeon or Nvidia?

I got an old Radeon 5770. I am thinking of benchmarking it bare metal and then replacing my 670 to see how it fairs in the KVM and also in Xen. I hope that I only get about 10 or 15% reduction. That seams to align with what I have seen online. If that works out then I will probably by a Radeon 290x and sell my Nvidia 670 for a 100 bucks or something. :-)

1. IOMMU(or something else, i haven't figured out what exactly yet) is buggy as hell. I have to mlock the memory or i'm getting IO_PAGE_FAULT. I have to do something magical or i'm getting IO_PAGE_FAULT. I have to disable hugepages or i'm getting IO_PAGE_FAULT. Beware of that - there may be bad combos.
2. Host GT610, guest 2xHD7750.
3. Dude, check this out! A whole table with stats and graphics and stuff!
https://docs.google.com/spreadsheet/ccc … _web#gid=0
4. AW has GTX750(afair), paired with intel(afair) and, you know, it works.

If possible, you should continue digging, there may be something wrong, especially when using nvidia drivers with hyper-v extensions.


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3282 2014-11-16 21:58:51

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

4kGamer wrote:

you can use ovmf-svn https://aur.archlinux.org/packages/ovmf-svn/

nbhs also built it from git. You can get it on Page 126, here in the thread.

sorry for a silly question, been playing with this whole day, cant google anymore. How to fetch from that AUR?

Offline

#3283 2014-11-16 22:02:57

4kGamer
Member
Registered: 2014-10-29
Posts: 88

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

there are several ways, but for me the easiest is just to 1. download the tarball 2. extract it and 3. run makepkg

Offline

#3284 2014-11-16 22:03:17

sinny
Member
Registered: 2014-05-24
Posts: 75

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

oreephrye wrote:
sinny wrote:

so, basically you did NO basic tuning

Actually... I troubleshooted the sound bit quite a lot. First I removed all sound devices to see if it would have an effect. That became my control environment for sound. I found that the FPS in two different games increase by roughly 2 or 3... *sarcastic woo*...  I figured I continue to mess around. I had a sound card. I passed that PCI device through and it worked awesomely. Except no improvements. In the end I found that the default sound emulation will work mostly fine. Except for the aforementioned problem. I asked about it because I do not want to have to use separate speakers (or some funky mixer) and if other people don't have to perhaps there is something I can due to tweak it.  I also switched between pulse audio and direct with ALSA. In fact I did a lot of s*** but I didn't explain in detail my whole troubleshooting history. Thats not how you open a conversation for help. I stated what the environment is and what i am currently doing as a starting place.

What about hugetlbfs... well did that too. No effect. What about compiling the kernel with the voluntary... did that too.. no effect.

One thing I didn't due was CPU pinning. I left that alone because I saw other people didn't have there settings adjusted. And I figured that it likely not improve performance much. I done stuff like that before  with little effect.

It is true that I haven't read all 131 pages of this forum. But it is also true that I never expected the performance to be 100% like bare metal. (nor did I type that) In fact I deal with that on a daily basis because I work on OpenStack for customers who always complain about this or that performance wise. My question was how much of a performance drop *should* I expect. Should it be ~30 % or 10 or what? And from what I am hearing it probably shouldn't be this low.

well, i have my reasons to write the stuff i write as well, in fact.
hugetlbfs as well as cpu pinning (+splitting cores intended for host from the ones used for guest(-s)) did noticeable improvement in my case.
increasing pa sample amount mostly fixed sound quality issues (stutterring, etc)
switching to separate pci audio card being passed through to guest (while connecting its' line-out to host's line-in) did HUGE performance improvement.

in the end, i got from 15-25 fps to 300+ in the same game. but that may be just my case

p.s. btw, talking about performance increases or drops (or comparing hw setups) while not specifying the task used to "measure" performance may be very wrong

Offline

#3285 2014-11-16 22:05:22

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

4kGamer wrote:

there are several ways, but for me the easiest is just to 1. download the tarball 2. extract it and 3. run makepkg

-bash: makepkg: command not found

which dependancy installs this? Im on Fedora...

Offline

#3286 2014-11-16 22:08:02

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

sinny wrote:

increasing pa sample amount mostly fixed sound quality issues (stutterring, etc)

Hmm, i seem to be misunderstanding what you did there. Can you drop an example or something? That should be quick.


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3287 2014-11-16 22:08:16

4kGamer
Member
Registered: 2014-10-29
Posts: 88

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

ahh, I'm sorry, I use arch, I am not familiar with fedora.

Offline

#3288 2014-11-16 22:11:04

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

devianceluka wrote:
4kGamer wrote:

there are several ways, but for me the easiest is just to 1. download the tarball 2. extract it and 3. run makepkg

-bash: makepkg: command not found

which dependancy installs this? Im on Fedora...

That is an arch tool that generates an arch package, afair.
To do this on fedora - you'll have to build an rpm.. I'm not going to tell you how to do that, i am unable to.

We could use checkinstall... ...but it is unavailable on fedora.


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3289 2014-11-16 22:14:32

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
devianceluka wrote:
4kGamer wrote:

there are several ways, but for me the easiest is just to 1. download the tarball 2. extract it and 3. run makepkg

-bash: makepkg: command not found

which dependancy installs this? Im on Fedora...

That is an arch tool that generates an arch package, afair.
To do this on fedora - you'll have to build an rpm.. I'm not going to tell you how to do that, i am unable to.

We could use checkinstall... ...but it is unavailable on fedora.

?:/
Can you atleast help me with why Windows DVD wont boot?

Last edited by devianceluka (2014-11-16 22:16:02)

Offline

#3290 2014-11-16 23:38:41

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

devianceluka wrote:

?:/
Can you atleast help me with why Windows DVD wont boot?

Well i've had some problems with windows install dvd boot, but i can't recall what was the problem.
I remember it was related to OVMF. Something like i haven't had the video output.

Something hints me that you have a peculiar disk system used in VM. Can you supply us a launching script/xml config from libvirt again?


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3291 2014-11-17 01:13:41

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
devianceluka wrote:

?:/
Can you atleast help me with why Windows DVD wont boot?

Well i've had some problems with windows install dvd boot, but i can't recall what was the problem.
I remember it was related to OVMF. Something like i haven't had the video output.

Something hints me that you have a peculiar disk system used in VM. Can you supply us a launching script/xml config from libvirt again?

qemu is from github v2.1.2, kernel 3.17.2:

vfio-bind 0000:02:00.0 0000:02:00.1
/xxx/qemu-system-x86_64 \
-enable-kvm -m 1024 -cpu host -smp 4,sockets=1,cores=4,threads=1 -vga none -nographic -balloon none \
-net nic,model=virtio,macaddr=xxx,model=virtio \
-net bridge,br=br0,helper=/xxx/qemu-bridge-helper \
-device vfio-pci,host=02:00.0,multifunction=on,romfile=/xxx/club3dr9290.rom \
-device vfio-pci,host=02:00.1 \
-device virtio-scsi-pci,id=scsi \
-drive file=/xxx/test.qcow2,id=disk,format=qcow2,cache=none,aio=native \
-drive if=pflash,format=raw,readonly,file=/root/OVMF/OVMF.fd \
-drive if=pflash,format=raw,file=/root/OVMF/OVMF_VARS.fd \
-cdrom /xxx/virtio.iso \
#-usb -usbdevice host:046d:c315
#-drive file=/xxx/ubuntu.iso,id=iso_install,if=none \
#-device scsi-cd,drive=iso_install \

With this latest build/compile of OVMF from ubuntu wiki I can't even grub-install EFI bootloader into EFI shell (always have to load by file)...

compiled like this:

git clone git://github.com/tianocore/edk2.git
cd edk2
make -C BaseTools
. edksetup.sh
nano Conf/target.txt 
"
ACTIVE_PLATFORM       = OvmfPkg/OvmfPkgX64.dsc 
TOOL_CHAIN_TAG        = GCC48
TARGET_ARCH           = X64 
"
build

and copy it out:

cp /root/OVMF/edk2/Build/OvmfX64/DEBUG_GCC48/FV/OVMF_CODE.fd /root/OVMF/OVMF_CODE.fd
cp /root/OVMF/edk2/Build/OvmfX64/DEBUG_GCC48/FV/OVMF_VARS.fd /root/OVMF/OVMF_VARS.fd

Offline

#3292 2014-11-17 05:20:56

sinny
Member
Registered: 2014-05-24
Posts: 75

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
sinny wrote:

increasing pa sample amount mostly fixed sound quality issues (stutterring, etc)

Hmm, i seem to be misunderstanding what you did there. Can you drop an example or something? That should be quick.

export QEMU_PA_SAMPLES=8192

Offline

#3293 2014-11-17 16:48:08

orcephrye
Member
Registered: 2014-11-15
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

sinny wrote:
export QEMU_PA_SAMPLES=8192

Well that is much higher then I tried it out. I did 512. :-P Should be more bold! Although I did do a line out to line in kinda setup and that seams to be working ok.

I attempted a few more tweaks. I added 'hv-time' and removed kvm=off. Then installed the older nvidia drivers that do not freak out. All of this didn't help a whole log. Everything seams to just give tiny little performance boosts or tiny performance decreases. I would like to try out CPU pinning. But the only articles showing how to do that is doing it with the XML file created by virt-install. I tried converting my command line arguments over but the VM wont load. Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?  There is cgroups... perhaps I should do that instead?

On another note thinking maybe I will download 3.17.3. I compiled 3.16.7. I also running Qemu 2.1 perhaps 2.2.

Either case I am still stuck with crappy performance. Namely the FPS in games is ok... just ever now and again it drops to almost zero.

Offline

#3294 2014-11-17 16:52:00

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:

Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?

info cpus from the QEMU monitor will give the thread ID for each vCPU, use taskset to pin them to separate physical CPUs.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#3295 2014-11-17 18:36:37

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

sinny wrote:
Duelist wrote:
sinny wrote:

increasing pa sample amount mostly fixed sound quality issues (stutterring, etc)

Hmm, i seem to be misunderstanding what you did there. Can you drop an example or something? That should be quick.

export QEMU_PA_SAMPLES=8192

Oh. Thanks. I forgot i've had that variable set up in the beggining of the script. Thanks for the hint again.


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#3296 2014-11-17 18:54:08

orcephrye
Member
Registered: 2014-11-15
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:
orcephrye wrote:

Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?

info cpus from the QEMU monitor will give the thread ID for each vCPU, use taskset to pin them to separate physical CPUs.

... This is why we pay you the big bucks aw.

Who 'we' is and how much is 'big' are probably interesting questions.

I used taskset before... dont know why I didn't think of it. I can combo it with isolcpus! That will keep that pesky scheduler out of my cores.  Once I get home I will play around with that.. see if it works. Not sure if I would need to get the thread_id though. I mean wouldn't something like:

# taskset -c 2,3,4,5,6,7 qemu-system-x86_64 (etc...) 

Would that get all spawned threads/subprocesses and assign them to cpus 3-8? I ask that question even though I am gonna go home and try that out.

Offline

#3297 2014-11-17 19:00:47

sinny
Member
Registered: 2014-05-24
Posts: 75

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:
sinny wrote:
export QEMU_PA_SAMPLES=8192

Well that is much higher then I tried it out. I did 512. :-P Should be more bold! Although I did do a line out to line in kinda setup and that seams to be working ok.

I attempted a few more tweaks. I added 'hv-time' and removed kvm=off. Then installed the older nvidia drivers that do not freak out. All of this didn't help a whole log. Everything seams to just give tiny little performance boosts or tiny performance decreases. I would like to try out CPU pinning. But the only articles showing how to do that is doing it with the XML file created by virt-install. I tried converting my command line arguments over but the VM wont load. Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?  There is cgroups... perhaps I should do that instead?

On another note thinking maybe I will download 3.17.3. I compiled 3.16.7. I also running Qemu 2.1 perhaps 2.2.

Either case I am still stuck with crappy performance. Namely the FPS in games is ok... just ever now and again it drops to almost zero.

the poor man's choice is (i have been using it - it was the most i could think of):
1) prevent host from using cpus intended for guest(-s) - "isolcpus" kernel parameter; 1 2-threaded core is more then enough in my case, taskset allows to lift this restriction when necessary
2) restrict cpus available for every qemu process - use taskset; something like "sudo -E taskset --cpu-list 1,2,5,6 qemu-system-x86_64 ..."

it's not cpu pinning, but at least it allowed to perform basic manual host cpu resource separation

later i switched to libvirt, which seems to successfully manage cpu pinning by itself - only isolcpus remains from old setup

Last edited by sinny (2014-11-17 19:02:13)

Offline

#3298 2014-11-17 19:05:06

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:
aw wrote:
orcephrye wrote:

Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?

info cpus from the QEMU monitor will give the thread ID for each vCPU, use taskset to pin them to separate physical CPUs.

... This is why we pay you the big bucks aw.

Who 'we' is and how much is 'big' are probably interesting questions.

I used taskset before... dont know why I didn't think of it. I can combo it with isolcpus! That will keep that pesky scheduler out of my cores.  Once I get home I will play around with that.. see if it works. Not sure if I would need to get the thread_id though. I mean wouldn't something like:

# taskset -c 2,3,4,5,6,7 qemu-system-x86_64 (etc...) 

Would that get all spawned threads/subprocesses and assign them to cpus 3-8? I ask that question even though I am gonna go home and try that out.

Sure, but that's not what you want.  You want to pin a single vCPU to a single pCPU such that the scheduler has zero migration to do and the caches are hot.  If you're benchmarking a VM, it's probably also best to set the performance governor in the host since ondemand can add latency to the guest's ability to react to load.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#3299 2014-11-17 20:02:46

orcephrye
Member
Registered: 2014-11-15
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

sinny wrote:
orcephrye wrote:
sinny wrote:
export QEMU_PA_SAMPLES=8192

Well that is much higher then I tried it out. I did 512. :-P Should be more bold! Although I did do a line out to line in kinda setup and that seams to be working ok.

I attempted a few more tweaks. I added 'hv-time' and removed kvm=off. Then installed the older nvidia drivers that do not freak out. All of this didn't help a whole log. Everything seams to just give tiny little performance boosts or tiny performance decreases. I would like to try out CPU pinning. But the only articles showing how to do that is doing it with the XML file created by virt-install. I tried converting my command line arguments over but the VM wont load. Is there a way to do cpu pinning via the "qemu-system-x86_64" cmd?  There is cgroups... perhaps I should do that instead?

On another note thinking maybe I will download 3.17.3. I compiled 3.16.7. I also running Qemu 2.1 perhaps 2.2.

Either case I am still stuck with crappy performance. Namely the FPS in games is ok... just ever now and again it drops to almost zero.

the poor man's choice is (i have been using it - it was the most i could think of):
1) prevent host from using cpus intended for guest(-s) - "isolcpus" kernel parameter; 1 2-threaded core is more then enough in my case, taskset allows to lift this restriction when necessary
2) restrict cpus available for every qemu process - use taskset; something like "sudo -E taskset --cpu-list 1,2,5,6 qemu-system-x86_64 ..."

it's not cpu pinning, but at least it allowed to perform basic manual host cpu resource separation

later i switched to libvirt, which seems to successfully manage cpu pinning by itself - only isolcpus remains from old setup

I just realized that my idea will not take every thread and place it on one CPU... but I am not sure if that's actually necessary:

... just refreshed and.. derp:

aw wrote:

Sure, but that's not what you want.  You want to pin a single vCPU to a single pCPU such that the scheduler has zero migration to do and the caches are hot.  If you're benchmarking a VM, it's probably also best to set the performance governor in the host since ondemand can add latency to the guest's ability to react to load.

So... perhaps a script like this:

VAR=2 && QEMUPID=`pidof /usr/bin/qemu-system-x86_64` && THREADLIST=`ps -o lwp --no-headers -p $QEMUPID -L | grep -v $QEMUPID` && for i in $THREADLIST ; do taskset -cp $VAR $i ; VAR=$((VAR+1)) ; done

Last edited by orcephrye (2014-11-17 20:03:23)

Offline

#3300 2014-11-17 20:54:52

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

orcephrye wrote:
aw wrote:

Sure, but that's not what you want.  You want to pin a single vCPU to a single pCPU such that the scheduler has zero migration to do and the caches are hot.  If you're benchmarking a VM, it's probably also best to set the performance governor in the host since ondemand can add latency to the guest's ability to react to load.

So... perhaps a script like this:

VAR=2 && QEMUPID=`pidof /usr/bin/qemu-system-x86_64` && THREADLIST=`ps -o lwp --no-headers -p $QEMUPID -L | grep -v $QEMUPID` && for i in $THREADLIST ; do taskset -cp $VAR $i ; VAR=$((VAR+1)) ; done

Seems like it might work, the vCPUs should be the first N threads spawned by the main QEMU pid.  BTW, you seem to be starting at physical CPU2, but you were originally using -smp cpus=8,sockets=1,cores=8,threads=1 on an 8-core processor.  Are you also scaling back to a 6-core guest?


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

Board footer

Powered by FluxBB