qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input
@ 2012-03-16 12:25 Jan Kiszka
  2012-03-16 13:16 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2012-03-16 12:25 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Marek Vasut, Paolo Bonzini

Once a chr frontend is able to receive input again, we need to inform
the io-thread about this fact. Otherwise, main_loop_wait may continue to
select without the related backend file descriptor in its set. This can
cause high input latencies if only low-rate events arrive otherwise.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

/me wonders if a similar issue explains the slirp slowness under KVM
with in-kernel irqchip enabled. Need to check...

 qemu-char.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 9a5be75..a589a84 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -177,6 +177,7 @@ void qemu_chr_accept_input(CharDriverState *s)
 {
     if (s->chr_accept_input)
         s->chr_accept_input(s);
+    qemu_notify_event();
 }
 
 void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
-- 
1.7.3.4

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

* Re: [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input
  2012-03-16 12:25 [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input Jan Kiszka
@ 2012-03-16 13:16 ` Anthony Liguori
  2012-03-16 13:18   ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2012-03-16 13:16 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marek Vasut, qemu-devel, Paolo Bonzini

On 03/16/2012 07:25 AM, Jan Kiszka wrote:
> Once a chr frontend is able to receive input again, we need to inform
> the io-thread about this fact. Otherwise, main_loop_wait may continue to
> select without the related backend file descriptor in its set. This can
> cause high input latencies if only low-rate events arrive otherwise.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>

I'm not nacking this patch, but please note that this is a band-aid as not all 
char devices actually use qemu_chr_accept_input().

Regards,

Anthony Liguori

> ---
>
> /me wonders if a similar issue explains the slirp slowness under KVM
> with in-kernel irqchip enabled. Need to check...
>
>   qemu-char.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index 9a5be75..a589a84 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -177,6 +177,7 @@ void qemu_chr_accept_input(CharDriverState *s)
>   {
>       if (s->chr_accept_input)
>           s->chr_accept_input(s);
> +    qemu_notify_event();
>   }
>
>   void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)

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

* Re: [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input
  2012-03-16 13:16 ` Anthony Liguori
@ 2012-03-16 13:18   ` Jan Kiszka
  2012-03-29 12:19     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2012-03-16 13:18 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Marek Vasut, qemu-devel, Paolo Bonzini

On 2012-03-16 14:16, Anthony Liguori wrote:
> On 03/16/2012 07:25 AM, Jan Kiszka wrote:
>> Once a chr frontend is able to receive input again, we need to inform
>> the io-thread about this fact. Otherwise, main_loop_wait may continue to
>> select without the related backend file descriptor in its set. This can
>> cause high input latencies if only low-rate events arrive otherwise.
>>
>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> 
> I'm not nacking this patch, but please note that this is a band-aid as not all 
> char devices actually use qemu_chr_accept_input().

Then they have to be fixed. :)

Jan

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

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

* Re: [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input
  2012-03-16 13:18   ` Jan Kiszka
@ 2012-03-29 12:19     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2012-03-29 12:19 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Marek Vasut, qemu-devel, Paolo Bonzini

On 2012-03-16 14:18, Jan Kiszka wrote:
> On 2012-03-16 14:16, Anthony Liguori wrote:
>> On 03/16/2012 07:25 AM, Jan Kiszka wrote:
>>> Once a chr frontend is able to receive input again, we need to inform
>>> the io-thread about this fact. Otherwise, main_loop_wait may continue to
>>> select without the related backend file descriptor in its set. This can
>>> cause high input latencies if only low-rate events arrive otherwise.
>>>
>>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>>
>> I'm not nacking this patch, but please note that this is a band-aid as not all 
>> char devices actually use qemu_chr_accept_input().
> 
> Then they have to be fixed. :)

Could you apply the patch in the meantime? It is not band-aid, but a
required base to fix such issues.

Jan

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

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

end of thread, other threads:[~2012-03-29 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 12:25 [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input Jan Kiszka
2012-03-16 13:16 ` Anthony Liguori
2012-03-16 13:18   ` Jan Kiszka
2012-03-29 12:19     ` Jan Kiszka

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).