From: Daniel Vetter Subject: Re: [PATCH 0/6] Page faults to help user space debug Date: Sat, 29 Jun 2013 23:28:51 +0200 Message-ID: <20130629212851.GB18285@phenom.ffwll.local> References: <1372458217-2053-1-git-send-email-ben@bwidawsk.net> <20130629212040.GA690@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 43D41E5CFD for ; Sat, 29 Jun 2013 14:28:54 -0700 (PDT) Received: by mail-wg0-f50.google.com with SMTP id k14so2698455wgh.29 for ; Sat, 29 Jun 2013 14:28:53 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130629212040.GA690@bwidawsk.net> 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: Ben Widawsky Cc: Paul Berry , Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Sat, Jun 29, 2013 at 02:20:40PM -0700, Ben Widawsky wrote: > On Sat, Jun 29, 2013 at 04:38:00PM +0200, Daniel Vetter wrote: > > On Sat, Jun 29, 2013 at 12:23 AM, Ben Widawsky wrote: > > > 2. echo 2 > /sys/kernel/debug/dri/0/i915_debug_flags > > > Unbind all buffers synchronously, so any batch which has bad code will fault > > > every time and not get lucky by hitting a buffer it bound. This will not catch > > > cases where it accidentally reads/writes someone else's buffer. > > > > We already have this as the drop_caches debugfs interface. Chris used > > it to reproduce the 3.7 reloc-tree regression, the only downside is > > that no one ever got around to write the respective i-g-t ... :( > > -Daniel > > In order to achieve the same behavior, one must instrument every GPU > client to use that interface before, and after every batch (you can skip > one if you're positive all clients have opted in). Also, every client > must be run as root. > > This mechanism I've introduced is much simpler to achieve the intended > result. Oh right, your patch is doing something else completely. One thing which would be neat on top of this is to randomize the locations of each bo a bit (varibale padding in front should be good enough). That way we can check whether the relocations are all handled properly. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch