From 74c572344be4ceccbbd2bb89668043adac0f3dee Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sun, 15 Nov 2015 10:19:03 +0000 Subject: vyatta-cfg-system: enable usb autosuspend to reduce cpu usage on kvm Add udev rules to enable USB autosuspend for QEMU emulated HIDs. Allowing the USB HID to be autosuspended reduces the CPU load on the host when guest VMs are idle. Based on the original patch by Gerd Hoffmann Bug #495 http://bugzilla.vyos.net/show_bug.cgi?id=495 --- sysconf/42-qemu-usb.rules | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sysconf/42-qemu-usb.rules (limited to 'sysconf') diff --git a/sysconf/42-qemu-usb.rules b/sysconf/42-qemu-usb.rules new file mode 100644 index 00000000..a79543df --- /dev/null +++ b/sysconf/42-qemu-usb.rules @@ -0,0 +1,14 @@ +# +# Enable autosuspend for qemu emulated usb hid devices. +# +# Note that there are buggy qemu versions which advertise remote +# wakeup support but don't actually implement it correctly. This +# is the reason why we need a match for the serial number here. +# The serial number "42" is used to tag the implementations where +# remote wakeup is working. +# +# Gerd Hoffmann + +ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" +ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" +ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" -- cgit v1.2.3