From: Ben Widawsky Subject: Re: [PATCH 15/16] intel_l3_parity: Support error injection Date: Fri, 13 Sep 2013 09:29:56 -0700 Message-ID: <20130913162956.GB17672@bwidawsk.net> References: <1379050122-12774-1-git-send-email-benjamin.widawsky@intel.com> <1379050122-12774-16-git-send-email-benjamin.widawsky@intel.com> <20130913091211.GF5459@phenom.ffwll.local> <20130913155452.GA17672@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id C0494E6996 for ; Fri, 13 Sep 2013 09:30:00 -0700 (PDT) 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: Daniel Vetter Cc: intel-gfx , Ben Widawsky , bryan.j.bell@intel.com, vishnu.venkatesh@intel.com List-Id: intel-gfx@lists.freedesktop.org On Fri, Sep 13, 2013 at 06:14:38PM +0200, Daniel Vetter wrote: > On Fri, Sep 13, 2013 at 5:54 PM, Ben Widawsky wrote: > > On Fri, Sep 13, 2013 at 11:12:11AM +0200, Daniel Vetter wrote: > >> On Thu, Sep 12, 2013 at 10:28:41PM -0700, Ben Widawsky wrote: > >> > Haswell added the ability to inject errors which is extremely useful for > >> > testing. Add two arguments to the tool to inject, and uninject. > >> > > >> > Signed-off-by: Ben Widawsky > >> > >> Do we run any risk that a concurrent write/read to the same register range > >> could hang the machine due to the same-cacheline w/a we need? Just want to > >> make sure that when we integrate this into a testcase there's no surprises > >> like with intel_gpu_top ... > >> -Daniel > > > > The race against the kernel is ever present on all tests/tools. Are we > > running parallel igt yet? If so, I can make the read/write functions > > threadsafe. > > > > On this note in particular I suppose we can make a debugfs entry like > > the forcewake one to allow user space to do register accesses. > > > > Interestingly, this also reminds me of another caveat I meant to put in > > the commit message and forgot... the error injection register is also > > per context, which makes it a pain to clear (and the pain in writing the > > test case). I'm even beginning to think maybe a debugfs for this > > register is the way to go. > > > > As a side note, the injection feature is entirely debug only - but > > agreed, random hangs in the test suite is not good. > > Hm, this will be tricky. If nothing else writes this range (i.e. not > our interrupt handler) we could use a secure batchbuffer and emit the > MI_LRI from the userspace batch. Then we could submit some workload > using hw contexts that uses the l3$ cache (I guess without something > in there it won't notice the injected error) and after the error is > detected we could simply kill the context, restoring the original > state again. > -Daniel Actually, I don't think there is anything else used in the cacheline of the error injection register which are accessed after driver load. -- Ben Widawsky, Intel Open Source Technology Center