All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alexander Graf <agraf@suse.de>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [HACK] hda: expose microphone instead of line-in
Date: Thu, 03 May 2012 11:30:56 -0300	[thread overview]
Message-ID: <4FA296A0.5070706@siemens.com> (raw)
In-Reply-To: <4FA2930A.1020804@redhat.com>

On 2012-05-03 11:15, Gerd Hoffmann wrote:
>   Hi,
> 
>>>> The point is that both pt as well as emulation suffer from the same
>>>> issue: lacking real-time support of QEMU. So I guess Windows uses a
>>>> different buffer size for the real hardware than for our HDA model.
>>>
>>> For pt hardware, the BARs just get directly mapped into guest memory space, so BAR accesses don't go through QEMU anymore. I guess you're also using the in-kernel PIC, at which point you're not using QEMU anymore for the HDA. The vcpus should keep running even when you move windows in VNC, right?
>>>
>>> So it could just as well be that Windows is not using a different buffer size, but you're simply exiting into QEMU a lot less, getting better latencies.
>>
>> That appears like a simple explanation, but I'm basically getting the
>> same exit rate with emulation as with pt (>2000 userspace exits/s). At
>> this rate, every significant userspace delay should be audible as it
>> also delays vcpu execution.
> 
> No.  Whatever the qemu iothread is doing does *not* disturb the vcpu(s),
> as long as they don't need the qemu mutex.  And with pt windows can play
> sound without needing the qemu mutex, whereas with emulation it is needed.

I measured userspace exists from the kernel. So the VCPU went through
the process of taking our Big QEMU Lock, at least 2000 times per second.

> 
>> The IRQ rate with pt is around 100 HZ. When does the hardware trigger an
>> IRQ? Likely before the end of the buffer. At half of its size?
> 
> Yes, half buffer.  one page buffersize -> 20ms sound data total -> irq &
> refill every 10ms -> 100 irqs/s needed.  Windows uses the same buffer
> size in passthrough case.

Then our problem may also lie elsewhere in the audio path.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

      reply	other threads:[~2012-05-03 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F97D9E4.7090608@siemens.com>
     [not found] ` <4F97EF39.8080207@redhat.com>
2012-05-02 18:17   ` [Qemu-devel] [HACK] hda: expose microphone instead of line-in Jan Kiszka
2012-05-02 22:42     ` Alexander Graf
2012-05-03 12:29       ` Jan Kiszka
2012-05-03 12:39         ` Gerd Hoffmann
2012-05-03 12:42         ` Alexander Graf
2012-05-03 13:49           ` Jan Kiszka
2012-05-03 14:15             ` Gerd Hoffmann
2012-05-03 14:30               ` Jan Kiszka [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=4FA296A0.5070706@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=agraf@suse.de \
    --cc=kraxel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.