qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [PATCH] memory: transaction API
Date: Thu, 21 Jul 2011 18:11:19 +0300	[thread overview]
Message-ID: <4E284197.8000903@redhat.com> (raw)
In-Reply-To: <4E28404D.1080002@siemens.com>

On 07/21/2011 06:05 PM, Jan Kiszka wrote:
> >
> >  The point is _update() can only make changes for one region atomic,
> >  while _commit() is more general.  You can sometimes batch all changes
> >  into a single container region, but sometimes it is clumsy, and
> >  sometimes impossible.
> >
> >  Deletion and creation are needed because we can't update an alias'
> >  offset.  I guess I can add that functionality.  But it still isn't as
> >  general as _commit().
>
> OK. What about providing _update wrappers? They could be implemented
> internally by the memory API in terms of begin - remove region - change
> region object - re-add region - end. That would avoid boilerplate code
> on the user side and still keep the option to do open-coded transaction
> also outside the core.

It's pretty easy to do updates without resorting to transactions.  If 
it's just some property, you simply call m_r_update_topology().  Things 
like priority need a bit more logic to keep the list in sorted order, 
but it's not really difficult.

> >
> >>>
> >>>>   I also think now that describing a memory region offline via a struct
> >>>>   and then passing that to an atomic add/del/update would be a more handy
> >>>>   and future-proof API than an increasing number set functions.
> >>>
> >>>   Maybe.  But it's not sufficient for atomic changes involving multiple
> >>>   regions.
> >>
> >>  Right. The question is still if there are use cases where this matters
> >>  (ie. update frequencies comparable to graphic scenarios).
> >
> >  Does even cirrus update this often?  I would guess cirrus usually uses
> >  the linear framebuffer, no?
>
> Not sure how this mode is called, but when vram is mapped linearly into
> the 0xa0000 range via two 32K banks, you get quite a few updates on
> larger screen changes.
>

Ok.  grub2 again?  or another guest?

> >
> >>  But such an IOCTL would resolve our problem with dropping a logged
> >>  region as well, right?
> >
> >  Yes, if done right.  Still we need to support older kernels.
>
> We will need workarounds like we have today, e.g. confining PAM memory
> region fragmentation to certain patterns that known OSes require. Full,
> correct support would remain the privilege of host kernels that allow to
> combine multi-region updates to an atomic operation (+ returning or
> preserving dirty logs).

An atomic update + dirty log fetch can be emulated by temporarily 
freezing all vcpus.


-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2011-07-21 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1311243679-18403-1-git-send-email-avi@redhat.com>
     [not found] ` <4E280195.5040003@siemens.com>
     [not found]   ` <4E281609.7090809@redhat.com>
     [not found]     ` <4E2816DE.5010102@siemens.com>
     [not found]       ` <4E2817DA.4030505@redhat.com>
     [not found]         ` <4E28211C.5060705@siemens.com>
     [not found]           ` <4E282286.2050508@redhat.com>
     [not found]             ` <4E2826E1.6090404@siemens.com>
     [not found]               ` <4E282E8A.40606@redhat.com>
     [not found]                 ` <4E283866.7040601@siemens.com>
     [not found]                   ` <4E283A1A.5070908@redhat.com>
2011-07-21 15:05                     ` [Qemu-devel] [PATCH] memory: transaction API Jan Kiszka
2011-07-21 15:11                       ` 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=4E284197.8000903@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --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).