From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: high load with usb device Date: Tue, 14 Sep 2010 15:02:22 +0400 Message-ID: <4C8F563E.6070701@msgid.tls.msk.ru> References: <4C80E839.50604@msgid.tls.msk.ru> <4C8A1AE3.8030705@redhat.com> <4C8A2187.1020202@msgid.tls.msk.ru> <4C8A59FE.9090400@msgid.tls.msk.ru> <4C8C9CAA.9030203@redhat.com> <4C8F1B54.60604@msgid.tls.msk.ru> <4C8F3B00.3000703@redhat.com> <4C8F3BA7.7060302@redhat.com> <4C8F47A1.4030600@msgid.tls.msk.ru> <4C8F497C.7000904@redhat.com> <4C8F4DA8.50606@msgid.tls.msk.ru> <4C8F50E1.3060704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: KVM list , Jes Sorensen , linux-perf-users@vger.kernel.org To: Avi Kivity Return-path: Received: from isrv.corpit.ru ([86.62.121.231]:57908 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415Ab0INLC0 (ORCPT ); Tue, 14 Sep 2010 07:02:26 -0400 In-Reply-To: <4C8F50E1.3060704@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 14.09.2010 14:39, Avi Kivity wrote: > On 09/14/2010 12:25 PM, Michael Tokarev wrote: >> Not that it is much helpful either. lsof: >> >> qemu-syst 23203 mjt 0u CHR 136,9 0t0 12 /dev/pts/9 >> qemu-syst 23203 mjt 1u CHR 136,9 0t0 12 /dev/pts/9 >> qemu-syst 23203 mjt 2u CHR 136,9 0t0 12 /dev/pts/9 >> qemu-syst 23203 mjt 3u CHR 10,232 0t0 4402 /dev/kvm >> qemu-syst 23203 mjt 4u 0000 0,9 0 607 anon_inode >> qemu-syst 23203 mjt 5r FIFO 0,8 0t0 8172675 pipe >> qemu-syst 23203 mjt 6w FIFO 0,8 0t0 8172675 pipe >> qemu-syst 23203 mjt 7u CHR 10,200 0t0 1228 /dev/net/tun >> qemu-syst 23203 mjt 8u 0000 0,9 0 607 anon_inode >> qemu-syst 23203 mjt 9u IPv4 8173217 0t0 TCP *:5900 (LISTEN) >> qemu-syst 23203 mjt 10u 0000 0,9 0 607 anon_inode >> qemu-syst 23203 mjt 11u 0000 0,9 0 607 anon_inode >> qemu-syst 23203 mjt 12u 0000 0,9 0 607 anon_inode > >> So it is constantly poking fds# 11, 12, 10, 5& 6. >> 5 and 6 are pipe (selfpipe?), > > signalfd emulation, used to deliver signals efficiently. Older glibc? [e]glibc-2.11. $ grep SIGNAL config-host.mak CONFIG_SIGNALFD=y >>From strace of another run: 24318 signalfd(-1, [BUS ALRM IO], 8) = 12 (so one of the remaining fds is a signalfd :) >> and 10..12 are "anon inode". > > Those are likely eventfds. > >> Here's the command line again: >> >> qemu-system-x86_64 \ >> -netdev type=tap,ifname=tap-kvm,id=x \ >> -device virtio-net-pci,netdev=x \ >> -monitor stdio \ >> -boot n \ >> -usbdevice tablet \ >> -m 1G \ >> -vnc :0 >> >> Yes, it does quite a lot of timer stuff... ;) > > So timers internal to usb. > > Please try (independently): > > - just -usb, without -usbdevice tablet No, that one works as expected - all quiet. -usbdevice tablet is also quiet up until guest loads usb host controller driver (not particular usb device driver). > - instrument calls to qemu_mod_timer() in hw/usb-*hci.c. Looks like > these are all 1kHz, but something else is clearly happening. Doing that now... Thanks! /mjt