public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [RFC][PATCH] qemu-kvm: Introduce writeback scope for cpu_synchronize_state
Date: Mon, 16 Nov 2009 22:22:56 +0100	[thread overview]
Message-ID: <4B01C2B0.3000205@web.de> (raw)
In-Reply-To: <4B01A487.3020808@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

Avi Kivity wrote:
> On 11/16/2009 07:00 PM, Jan Kiszka wrote:
>> This patch aims at addressing the mp_state writeback issue in a cleaner
>> fashion.
> 
> What's the issue?  the fact that mp_state is updated whenever state is
> synchronized, while it could be simultaneously updated from other vcpus
> (which latter updates are then lost)?

Right, the issue b8a7857071 addressed. But that approach spreads more
kvm_* fragments in unrelated qemu code, e.g. the monitor, and fails to
update other parts (gdbstub). And it doesn't care about what happens if
kvm is off at build or runtime. Such things are better addressed in
upstream by encapsulating kvm calls in synchronization points.

> 
>> By introducing additional information about the scope of the
>> scheduled vcpu state writeback, we can simply skin mp_state (and maybe
>> other specific states in the future) when updating the in-kernel state.
>>
>> The writeback scope is defined when calling cpu_synchronize_state. It
>> accumulated, ie. once a full writeback was requested, this will stick
>> until it was performed.
>>    
> 
> Maybe it's just simpler to divorce mp_state from the rest of the state.

That won't solve the core issue. mp_state *is* part of the state, and
needs to be read (to update halted) and sometimes also written when the
state was hard reset.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-11-16 21:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 17:00 [RFC][PATCH] qemu-kvm: Introduce writeback scope for cpu_synchronize_state Jan Kiszka
2009-11-16 18:20 ` Alexander Graf
2009-11-16 19:14 ` Avi Kivity
2009-11-16 21:22   ` Jan Kiszka [this message]
2009-11-17  8:05     ` Avi Kivity
2009-11-17  8:14       ` Jan Kiszka
2009-11-17  8:37         ` Avi Kivity
2009-11-17  9:16           ` Jan Kiszka
2009-11-17 12:37             ` Avi Kivity
2009-11-17 13:05               ` Jan Kiszka
2009-11-17 13:28                 ` Avi Kivity
2009-11-17 14:12                   ` Jan Kiszka
2009-11-17 14:25                     ` Avi Kivity
2009-11-17 16:50                       ` Jan Kiszka
2009-11-17 16:58                         ` Jan Kiszka
2009-11-18 13:48                           ` Avi Kivity
2009-11-17 16:59                         ` Avi Kivity
2009-11-18  9:50                           ` Jan Kiszka
2009-11-18 13:46                             ` Avi Kivity

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=4B01C2B0.3000205@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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