From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 15/15] drm/i915: no more agp for gem Date: Sun, 07 Nov 2010 10:55:07 +0000 Message-ID: <5b55a1$ijc8ht@fmsmga002.fm.intel.com> References: <1289053328-9874-1-git-send-email-daniel.vetter@ffwll.ch> <1289053328-9874-16-git-send-email-daniel.vetter@ffwll.ch> <0d30dc$k3nai0@orsmga001.jf.intel.com> <20101107102025.GA3474@viiv.ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FA2E9E75F for ; Sun, 7 Nov 2010 02:55:10 -0800 (PST) In-Reply-To: <20101107102025.GA3474@viiv.ffwll.ch> 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: Daniel Vetter Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, 7 Nov 2010 11:20:26 +0100, Daniel Vetter wrote: > Wrt future plans: My idea behind separating the dmar mapping and the gtt > pte writing was to be able to keep around the dmar mapping even when the > bo is not bound to the gtt. Together with a phys_memory domain to avoid > cflush on rebind, that should pretty much kill aperture trashing. Lots of overlap with what I am attempting right now. I've just approached the problem from top-down and looked at reusing dead-bo as handles into GTT space. Keeping a page cache is essential to minimise clflush on aperture thrashing, after that the rebind penalty is next on the CPU profiles. The observation is that workloads tend to keep reusing the same buffer sizes, and so we can get a very good hit rate from keeping a deferred-free list and stealing the GTT space from those dead bo. (Now the worst offender is scanning the deferred-free list for victims, but a win overall.) Approaching this from the bottom up, we can start tracking inactive bound pages in the GTT manager, such that the rebind penalty can be avoided in far more cases. Interesting... For the time being, I'll keep on improving my understanding of the VM by bugfixing my current page-stealer which (I believe) is fundamental to transferring pages between the GTT and system/swap cheaply. [And I may look at one or two bugs. ;-] -Chris -- Chris Wilson, Intel Open Source Technology Centre