[PATCH v4] drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl

Eric Anholt eric at anholt.net
Thu Oct 19 20:09:57 UTC 2017


Boris Brezillon <boris.brezillon at free-electrons.com> writes:

> This ioctl will allow us to purge inactive userspace buffers when the
> system is running out of contiguous memory.
>
> For now, the purge logic is rather dumb in that it does not try to
> release only the amount of BO needed to meet the last CMA alloc request
> but instead purges all objects placed in the purgeable pool as soon as
> we experience a CMA allocation failure.
>
> Note that the in-kernel BO cache is always purged before the purgeable
> cache because those objects are known to be unused while objects marked
> as purgeable by a userspace application/library might have to be
> restored when they are marked back as unpurgeable, which can be
> expensive.
>
> Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>

I got an ack from Dave on the ioctl struct, so I think we're good to
go.  Reviewed and pushed.  Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171019/e547b9e4/attachment.sig>


More information about the dri-devel mailing list