qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-gpu: track and limit host memory allocat


From: David Airlie
Subject: Re: [Qemu-devel] [PATCH] virtio-gpu: track and limit host memory allocations
Date: Tue, 29 Nov 2016 14:38:50 -0500 (EST)


----- Original Message -----
> From: "Gerd Hoffmann" <address@hidden>
> To: address@hidden
> Cc: "Gerd Hoffmann" <address@hidden>, "Marc-André Lureau" <address@hidden>, 
> "Dave Airlie"
> <address@hidden>, "李强" <address@hidden>, "Michael S. Tsirkin" <address@hidden>
> Sent: Tuesday, 29 November, 2016 10:42:36 PM
> Subject: [PATCH] virtio-gpu: track and limit host memory allocations
> 
> This patch makes virtio-gpu track host memory allocations for ressources
> and applies a limit (configurable 256M by default).  When exceeding the
> limit virtio-gpu throws VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY errors (like
> it already does today when pixman image allocations fail).
> 
> This patch covers 2d mode only.  For 3d mode we have to figure how we
> are going to handle this best.  qemu doesn't track resources in case
> virglrenderer is used, so I guess we should extend virglrenderer to
> allow setting a limit, then let qemu set the limit and catch
> virgl_renderer_resource_create failures.

The problem being we have no idea how much memory a GL allocation
takes on the host, it is totally dependant on the GL drivers installed,
and there is no way to find out. Space on host memory could be anywhere
from a few bytes of metadata to the whole size of the allocation +
a bunch of meta data overhead.

Dave.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]