qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2)
Date: Wed, 16 Feb 2011 11:34:05 +0100	[thread overview]
Message-ID: <4D5BA81D.1080205@siemens.com> (raw)
In-Reply-To: <4D5BA6A2.9080701@redhat.com>

On 2011-02-16 11:27, Paolo Bonzini wrote:
> On 02/16/2011 11:04 AM, Jan Kiszka wrote:
>> On 2011-02-16 10:57, Paolo Bonzini wrote:
>>> On 02/16/2011 10:46 AM, Jan Kiszka wrote:
>>>> What should this be good for? The iothread already kicks the vcpu if it
>>>> wants to acquire the contended global mutex.
>>>
>>> Assuming the VCPU is in the timedwait that Marcelo changed, the global
>>> mutex is free and the iothread will not kick the VCPU.
>>
>> Then why should it kick it at all?
> 
> To make it notice something changed in all_cpu_threads_idle---but that's 
> wrong, it should have been kicked in cpu_interrupt.
> 
>> If we change the halt condition, we should not kick the vcpus but only
>> signal the condition variable. Actually, I've a patch queued that skips
>> pointless qemu_thread_signal in qemu_cpu_kick for TCG.
> 
> Yes, I was kicking just because that's the wrapper that is used to 
> signal the condition variable---just like I was kicking in my patches to 
> eliminate timedwait.
> 
>>> So, perhaps the correct fix is to kick the cpu in cpu_interrupt, and all
>>> I wrote about timeouts and timers is wrong.  My patch would band-aid it.
>>
>> That's my strong suspect. We really need to understand what goes wrong.
> 
> I agree on both counts.
> 

FWIW, I've rebased most of your patches on top of my outstanding ones
and pushed them to

git://git.kiszka.org/qemu-kvm.git queues/kvm-upstream

Jan

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

  reply	other threads:[~2011-02-16 10:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 17:54 [Qemu-devel] [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD Marcelo Tosatti
2011-02-15 18:58 ` [Qemu-devel] " Jan Kiszka
2011-02-15 20:04   ` Marcelo Tosatti
2011-02-15 20:33     ` Jan Kiszka
2011-02-15 20:55       ` Marcelo Tosatti
2011-02-15 20:56         ` [Qemu-devel] [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2) Marcelo Tosatti
2011-02-16  8:27           ` [Qemu-devel] " Jan Kiszka
2011-02-16  9:32           ` Paolo Bonzini
2011-02-16  9:46             ` Jan Kiszka
2011-02-16  9:57               ` Paolo Bonzini
2011-02-16 10:04                 ` Jan Kiszka
2011-02-16 10:27                   ` Paolo Bonzini
2011-02-16 10:34                     ` Jan Kiszka [this message]
2011-02-16 11:05                       ` Paolo Bonzini
2011-02-17  3:15             ` Marcelo Tosatti
2011-02-17  8:27               ` Paolo Bonzini
2011-02-18 17:13                 ` Paolo Bonzini
2011-02-17  8:29               ` Jan Kiszka

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=4D5BA81D.1080205@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@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 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).