KVM: x86: Run PIT work in own kthread
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 24 Apr 2012 14:40:17 +0000 (16:40 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 27 Apr 2012 22:40:29 +0000 (19:40 -0300)
commitb6ddf05ff68d81a7c1736717faf492b70e9bf4f9
treedbcf0f64e8bd0e420a498b6d074b5f0d1afc91ed
parent0589ff6c11d8128cf053c3ddc75b0f6d8b71c62b
KVM: x86: Run PIT work in own kthread

We can't run PIT IRQ injection work in the interrupt context of the host
timer. This would allow the user to influence the handler complexity by
asking for a broadcast to a large number of VCPUs. Therefore, this work
was pushed into workqueue context in 9d244caf2e. However, this prevents
prioritizing the PIT injection over other task as workqueues share
kernel threads.

This replaces the workqueue with a kthread worker and gives that thread
a name in the format "kvm-pit/<owner-process-pid>". That allows to
identify and adjust the kthread priority according to the VM process
parameters.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Documentation/virtual/kvm/api.txt
arch/x86/kvm/i8254.c
arch/x86/kvm/i8254.h