From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: [RFC] Set cache level ioctl Date: Mon, 9 Jul 2012 12:34:36 +0100 Message-ID: <1341833679-11614-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id E2C8A9E940 for ; Mon, 9 Jul 2012 04:35:35 -0700 (PDT) Received: from arrandale.alporthouse.com (unverified [78.156.66.37]) by fireflyinternet.com (Firefly Internet SMTP) with ESMTP id 117856675-1500050 for ; Mon, 09 Jul 2012 12:35:30 +0100 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org One of the niceties of SandyBridge was that it introduced a shared LLC cache between the CPU and the GPU. This allows us assume cache coherency of a bo and so mix CPU and GPU access to the same buffer (with a few caveats of course). Older architectures used snooping to achieve very nearly the same effect (the only observable difference for the driver is the greatly increased bandwidth between the CPU and GPU and memory that SandyBridge also introduced). However, whilst we were able to enable LLC sharing by default on SNB as it has no obvious penalty and could be handled implicitly by the drivers, snoopable memory on the other hand must be managed explicitly (only certain types of buffers are allowed to snoopable, and overuse leads to degraded performace). So we expose an ioctl to grant userspace the ability to do so. Note that this has a significant patch to the drm_mm to enable segregation of different memory domains within the GTT, and that Daniel wants a battery of coherency checks for i-g-t, hence it is not quite ready just yet. As it stands I have used it to good effect within the DDX. Bring on vmap! -Chris