mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/1]
@ 2017-07-06 10:48 Claudio Imbrenda
  2017-07-06 10:48 ` [PATCH v2 1/1] KVM: trigger uevents when starting or stopping a VM Claudio Imbrenda
  0 siblings, 1 reply; 4+ messages in thread
From: Claudio Imbrenda @ 2017-07-06 10:48 UTC (permalink / raw)
  To: kvm; +Cc: borntraeger, pbonzini, linux-kernel

This patch adds a few lines to the KVM common code to fire a
KOBJ_CHANGE uevent whenever a KVM VM is created or destroyed. The event
carries four environment variables:

KVM_VM_CREATED indicates how many times a new VM has been created. It
               is useful for example to trigger specific actions when
               the first VM is started
KVM_VM_COUNT indicates how many VMs are currently active. This can be
             used for logging or monitoring purposes
KVM_VM_PID has the pid of the KVM process that has been started or
           stopped. This can be used to perform process-specific
           tuning.
KVM_VM_STATS_PATH contains the path in /sys to the directory with all
                  the runtime statistics for this VM. This is useful
                  for performance monitoring and profiling.

Specific udev rules can be then set up in userspace to deal with the
creation or destruction of VMs as needed.


v1 -> v2:
* added KVM_VM_PID and KVM_VM_STATS_PATH
* some cleanup, the patch should look nicer now
* rebased on 4.12

Claudio Imbrenda (1):
  KVM: trigger uevents when starting or stopping a VM

 virt/kvm/kvm_main.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-07 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 10:48 [PATCH v2 0/1] Claudio Imbrenda
2017-07-06 10:48 ` [PATCH v2 1/1] KVM: trigger uevents when starting or stopping a VM Claudio Imbrenda
2017-07-06 12:39   ` Paolo Bonzini
2017-07-07 15:41   ` Paolo Bonzini

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®