From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v4] drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl Date: Thu, 19 Oct 2017 13:09:57 -0700 Message-ID: <87vaja6gru.fsf@anholt.net> References: <20171019125748.3152-1-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2055054204==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 14B566EB66 for ; Thu, 19 Oct 2017 20:09:59 +0000 (UTC) In-Reply-To: <20171019125748.3152-1-boris.brezillon@free-electrons.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Cc: Boris Brezillon , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2055054204== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Boris Brezillon 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 I got an ack from Dave on the ioctl struct, so I think we're good to go. Reviewed and pushed. Thanks! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlnpBpUACgkQtdYpNtH8 nuiRxhAAjLssZHjbiW+7GiWtEp60MDu8YRUpIQr5I6QkY6qtKEn8TRu8ot2gLX0Q cNysV8Wels+IcMNN1JxSmbAqcODTsVY6g5a7TrrdehPSrnAnXts+jibhNY1eHs0L gMcmE7MUpdaGX1xjbMj8lJTJVUaGxxxGhNLZZN4bTmbazdS21nbfI9IAE8pWOiEV pXiNdYJmmPCzIl5ejUUBPDl8tzoQu2dYwMS3vwIe3eGslEn5770d2X/ZOLPC/BQA ldCNOcOY3htFJ598H1CXjrNrCnUM0MrkVLjmxblaV7kkoDQR7vnUDeMuyJEOzNo1 9Rk6fHyyvdFVXFi5Ub5dBhKpiJb1aelkEzOr/FJtRzSoyE3lrtF81R0C0UeicZTv BdFDj2xpXAOtfWBx6upYdEEi3KPae/BfvT5TvD7Lxc3WuFGovRzrMzP8WvqIdsR8 nrKeSf3y0D3V2goFnxK3Fvc57viVZJWh/E2cJEp/zh+WFoTNRfc+zT1MMW99rbSS Al4QtcjdyWmQMwRMsIOoQ6WBUBDzyNWxLCjk22jjivmyGmq5jYbRlaLuCWyCmRJr mj5O95IfG3fyJ0/nZCyG6iFnRcc/ZyP+PuH8CRR5AFfqB8PpWKe+T4trM7Ivd1gb 4x4ZFscKHgyqhkLEcJ1NBs6JO+X3TOS9O0Zy7UYlbA737kyvqu0= =0ivV -----END PGP SIGNATURE----- --=-=-=-- --===============2055054204== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2055054204==--