From: Alex Williamson <alex.williamson@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers
Date: Thu, 31 Mar 2011 13:17:15 -0600 [thread overview]
Message-ID: <1301599035.3131.8.camel@x201> (raw)
In-Reply-To: <4D94CFA0.3030605@codemonkey.ws>
On Thu, 2011-03-31 at 14:01 -0500, Anthony Liguori wrote:
> On 03/31/2011 01:49 PM, Michael S. Tsirkin wrote:
> > On Thu, Mar 31, 2011 at 01:33:58PM -0500, Anthony Liguori wrote:
> >> On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote:
> >>> Currently, vga cards that allocate vga ram,
> >>> register it as regular ram. When this happens
> >>> a lot, vhost need to get notified and flush
> >>> its memory tables, which is slow.
> >>>
> >>> This was observed with cirrus vga.
> >>>
> >>> As a solution, add an explicit flag when
> >>> registering vga ram, vhost-net can simply ignore it.
> >>>
> >>> Long term, we might be able to use this API
> >>> to avoid the need to request
> >>> dirty loggin from devices explicitly.
> >>>
> >>> Tested: with cirrus vga only.
> >>>
> >>> Signed-off-by: Michael S. Tsirkin<mst@redhat.com>
> >> Treating vga specially is not the right approach.
> >>
> >> You want to treat real RAM specially and only make that visible to
> >> vhost. See http://wiki.qemu.org/Features/RamAPI
> > That seems like a dead project? And VGa is unhandled there.
>
> Just needs some love.
>
> VGA is just another device. It happens to be that we treat VGA device
> memory as something that behaves like ram occassionally but that does
> not make it RAM.
>
> Something like vhost doesn't need to see anything but RAM. If we have a
> mechanism to identify RAM as RAM, then vhost can only look at RAM memory
> and not worry about things like VGA.
>
> I thought Alex had gotten a mini-version of RamAPI in but I can't seem
> to figure out what that included. At any rate, the point is still that
> registering things that you want to exclude in vhost is the wrong
> approach, you want to explicitly mark the things you want to include.
Conveniently I've just started to push my WIP VFIO patches out to a
public tree. You can find the minimal RamAPI in these:
https://github.com/awilliam/qemu-kvm-vfio/commit/182e557b544bb6e8c6cc57a2a6075d768d224082
https://github.com/awilliam/qemu-kvm-vfio/commit/a505fe08defb4fa1720fffbdf3489289bc930264
(I reserve the right to break these commits)
VFIO only needs the ram_for_each_slot() interface to setup and teardown
the iommu, but obviously this should include memory client type
callbacks for things that only want to track memory.
Alex
next prev parent reply other threads:[~2011-03-31 19:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 17:43 [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers Michael S. Tsirkin
2011-03-31 18:33 ` Anthony Liguori
2011-03-31 18:49 ` Michael S. Tsirkin
2011-03-31 19:01 ` Anthony Liguori
2011-03-31 19:07 ` Michael S. Tsirkin
2011-03-31 19:26 ` Anthony Liguori
2011-03-31 20:03 ` Michael S. Tsirkin
2011-03-31 20:21 ` Anthony Liguori
2011-03-31 19:17 ` Alex Williamson [this message]
2011-03-31 19:18 ` Peter Maydell
2011-03-31 19:29 ` Anthony Liguori
2011-03-31 20:12 ` Peter Maydell
2011-03-31 20:23 ` Anthony Liguori
2011-03-31 21:32 ` Peter Maydell
2011-03-31 21:38 ` Michael S. Tsirkin
2011-03-31 21:49 ` Anthony Liguori
2011-03-31 23:42 ` Michael S. Tsirkin
2011-04-01 0:44 ` Anthony Liguori
2011-04-01 1:07 ` Michael S. Tsirkin
2011-04-01 7:12 ` Peter Maydell
2011-04-01 11:21 ` Michael S. Tsirkin
2011-03-31 21:26 ` Michael S. Tsirkin
2011-03-31 21:32 ` Anthony Liguori
2011-03-31 21:37 ` Michael S. Tsirkin
2011-03-31 21:48 ` Anthony Liguori
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=1301599035.3131.8.camel@x201 \
--to=alex.williamson@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=mst@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).