From: Chris Wilson Subject: Re: [PATCH] tests/gem_fence_trash: make threaded tests more through-rough Date: Mon, 8 Apr 2013 09:52:50 +0100 Message-ID: <20130408085250.GC3792@cantiga.alporthouse.com> References: <1365405835-2854-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id F0064E5F8D for ; Mon, 8 Apr 2013 01:53:04 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1365405835-2854-1-git-send-email-daniel.vetter@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: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 08, 2013 at 09:23:55AM +0200, Daniel Vetter wrote: > With this at least the y-tiled test reliably fails on my machines, but > x-tiled still passes on some. More ideas to tune this highly welcome. > > v2: Fill cpu caches with data for each newly allocated bo. This seems > to do the trick on my snb here _really_ reliably. So apparently the > backsnoop for llc gtt writes is the crucial ingredient here to make > the test fail. > > While at it, also stop leaking mmap space. > > v3: Fixup commit message. > > Cc: Mika Kuoppala > Cc: Chris Wilson > Signed-off-by: Daniel Vetter Yes, that is much more effective - even at weeding out incomplete fixes which passed the original test case. > --- > tests/gem_fence_thrash.c | 23 ++++++++++++++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) > > diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c > index 3fc72a1..01fd0f6 100644 > --- a/tests/gem_fence_thrash.c > +++ b/tests/gem_fence_thrash.c > @@ -69,6 +69,12 @@ bo_create (int fd, int tiling) > > handle = gem_create(fd, OBJECT_SIZE); > > + /* dirty cpu caches a bit ... */ > + ptr = gem_mmap__cpu(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); > + assert(ptr); Pedagogical:+ gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); -Chris -- Chris Wilson, Intel Open Source Technology Centre