qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: "Chris Webb" <chris@arachsys.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	"Jernej Simončič" <jernej's-kvm@eternallybored.org>
Subject: Re: [Qemu-devel] High CPU use of -usbdevice tablet (was Re: KVM usability)
Date: Mon, 05 Apr 2010 11:22:32 +0300	[thread overview]
Message-ID: <4BB99DC8.6030106@redhat.com> (raw)
In-Reply-To: <201004042253.18066.paul@codesourcery.com>

On 04/05/2010 12:53 AM, Paul Brook wrote:
>
>> Surprising as there are ~10 descriptors being
>> polled, so ~1200 polls per second.  Maybe epoll will help here.
>>      
> I'm not sure where you get 1200 from.  select will be called once per host
> wakeup. i.e. if the USB controller is enabled then 1k times per second due to
> the frame tick.
>    

That was 125 interrupts/sec x 10 fds ('poll' here was the per-file 
callback in the kernel, not the select call).  With your numbers, it's 
more like 10k polls/sec which can be eliminated.

> Are you sure there are actually 10 descriptors being polled? Remember that the
> nfds argument is the value of the largest fd in the set (+1), not the number
> of descriptors in the set.
>    

I was estimating from the strace parsed output, the real number is 7.  
So the kernel calls 7k callbacks/sec only to return with a timeout.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

      reply	other threads:[~2010-04-05  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1267068445.1726.25.camel@localhost>
     [not found] ` <1267089644.12790.74.camel@laptop>
     [not found]   ` <1267152599.1726.76.camel@localhost>
     [not found]     ` <20100226090147.GH15885@elte.hu>
     [not found]       ` <4B879A2F.50203@redhat.com>
     [not found]         ` <20100226103545.GA7463@elte.hu>
     [not found]           ` <4B87A6BF.3090301@redhat.com>
     [not found]             ` <20100226111734.GE7463@elte.hu>
     [not found]               ` <4B8813F2.8090208@redhat.com>
     [not found]                 ` <20100227105643.GA17425@elte.hu>
2010-02-27 13:30                   ` [Qemu-devel] Re: KVM usability Jan Kiszka
     [not found]                   ` <d9c105ea1003011312s935c3c5haa1ec80aebe14d88@mail.gmail.com>
     [not found]                     ` <4B8C38B8.8010007@codemonkey.ws>
     [not found]                       ` <1267498953.2460.32.camel@x200>
     [not found]                         ` <20100302082118.GT1924@arachsys.com>
     [not found]                           ` <428008581.20100302103400@eternallybored.org>
     [not found]                             ` <4B938F9D.7010207@redhat.com>
2010-04-04 12:31                               ` [Qemu-devel] High CPU use of -usbdevice tablet (was Re: KVM usability) Chris Webb
2010-04-04 14:25                                 ` Paul Brook
2010-04-04 16:58                                   ` Avi Kivity
2010-04-04 21:03                                     ` Paul Brook
2010-04-04 21:53                                     ` Paul Brook
2010-04-05  8:22                                       ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BB99DC8.6030106@redhat.com \
    --to=avi@redhat.com \
    --cc=chris@arachsys.com \
    --cc=jernej's-kvm@eternallybored.org \
    --cc=kvm@vger.kernel.org \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).