From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: i-g-t prime_self_import & gem_flink_race: leaked -1 objects Date: Fri, 1 Nov 2013 17:30:47 +0100 Message-ID: <20131101163047.GN4167@phenom.ffwll.local> References: <92648605EABDA246B775AAB04C95A7A301210FD5@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 74773EE846 for ; Fri, 1 Nov 2013 09:30:21 -0700 (PDT) Received: by mail-ee0-f45.google.com with SMTP id e50so2106613eek.32 for ; Fri, 01 Nov 2013 09:30:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: <92648605EABDA246B775AAB04C95A7A301210FD5@IRSMSX103.ger.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: "Mateo Lozano, Oscar" Cc: "Intel-gfx@lists.freedesktop.org" , "Widawsky, Benjamin" List-Id: intel-gfx@lists.freedesktop.org On Fri, Nov 01, 2013 at 12:55:54PM +0000, Mateo Lozano, Oscar wrote: > Hi Ben, > = > I=B4ll switch the conversation to the mailing list... > = > In the case of prime_self_import, the problem is self-contained (it > doesn=B4t really need a previous test A): the first subtest opens the > first fd, which provokes a context switch (gem_quiescent_gpu). This > switch is actually completed (gem_quiescent_gpu makes sure with a > gem_sync) and the old context disposed of, but its backing object > remains alive until a retire_work kicks in (which in my case usually > happens in the middle of the prime_self_test/export-vs-gem_close-race > subtest, thus the "-1 objects leaked"). The comment in do_switch says it > all: > = > /* The backing object for the context is done after switching to the > * *next* context. Therefore we cannot retire the previous context until > * the next context has already started running. In fact, the below code > * is a bit suboptimal because the retiring can occur simply after the > * MI_SET_CONTEXT instead of when the next seqno has completed. > */ > = > I=B4ll send a fix for prime_self_import, but... maybe we should make sure > that the GPU is really quiescent, rather than fixing individual tests? > (retire requests via drop caches at the end of gem_quiescent_gpu?). Cool, you've already thought of my suggestion for your patch. Please implement, I like it ;-) Cheers, Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch