From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: Shared memory management Date: Sat, 3 Mar 2012 10:04:09 +0000 Message-ID: <20120303100408.GA7052@cloud01> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 132B79E7B4 for ; Sat, 3 Mar 2012 02:02:24 -0800 (PST) Content-Disposition: inline In-Reply-To: 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: Michal Mocny Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Mar 01, 2012 at 11:41:53AM -0500, Michal Mocny wrote: > Hello, > > I am trying to measure video memory usage as per Ben Widawsky's > instructions from a while back: > > mount debugfs > cat /sys/kernel/debug/dri/0/i915_gem_gtt > > However, the numbers are difficult to read/draw conclusions from. Can I > get some insight into the meaning of the various column values? > Specifically, if I would like to measure the actual current physical > memory usage, should any of the values be ignored? > > Thanks, > -Michal At the bottom you should see something like: Total 370 objects, 35368960 bytes, 35368960 GTT size The number in bytes (not sure offhand how it differs from GTT) is the current physical memory usage of GEM objects. While it does not account for internal data structures, or currently locked user pages (which could be very large at various times), it is a good approximation. I've since learned Eugeni Dodonov has written a tool to make this more readable. I'm not sure what you get if you use that instead. ~Ben