From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tvrtko Ursulin Subject: Re: [PATCH] tests/gem_userptr_blits: Race between object creation and multi-threaded mm ops Date: Mon, 14 Jul 2014 14:13:22 +0100 Message-ID: <53C3D772.7090004@linux.intel.com> References: <1405332206-6292-1-git-send-email-tvrtko.ursulin@linux.intel.com> <20140714103416.GB2319@nuc-i3427.alporthouse.com> <53C3B48A.2050306@linux.intel.com> <20140714130725.GC2319@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 D55656E2DB for ; Mon, 14 Jul 2014 06:13:24 -0700 (PDT) In-Reply-To: <20140714130725.GC2319@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Intel-gfx@lists.freedesktop.org, Tvrtko Ursulin List-Id: intel-gfx@lists.freedesktop.org On 07/14/2014 02:07 PM, Chris Wilson wrote: >>> You don't have any cancellation points in the loop. (mmap may or may not >>> be, it is not required to be.) >>> >>> But rather than use a global, just pass a pointer to a local struct. >> >> It doesn't need both a cancellation point and a flag. Should I just >> add pthread_testcancel in the loop and not have any flag at all? > > testcancel also neatly avoids the handwavely lack of mb(). Barrier for what? But it doesn't matter, I'll re-spin with testcancel. >>> Oh, and igt_assert. But kill the asserts in mm_stress_thread() first. >> >> Why remove completely? My thinking was to use assert vs igt_assert >> to distinguish between assumptions about system behaviour, and >> igt_assert for assertions about tested functionality. > > If the assert fires you make the igt test runner angry. Might as well > report a test failure rather than break down completely. I am not familiar with the test runner, but if it cannot handle a test failing in a way other than it expects it so it deserves to be angry. :) But OK, I'll change it. Tvrtko