From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE28F6E484 for ; Sat, 14 Aug 2021 01:48:13 +0000 (UTC) Date: Fri, 13 Aug 2021 18:29:28 -0700 Message-ID: <87tujshkzr.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210813074703.18778-6-zbigniew.kempczynski@intel.com> References: <20210813074703.18778-1-zbigniew.kempczynski@intel.com> <20210813074703.18778-6-zbigniew.kempczynski@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Subject: Re: [igt-dev] [PATCH i-g-t 5/9] tests/gem_exec_capture: Support gens without relocations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Zbigniew =?ISO-8859-2?Q?Kempczy=F1ski?= Cc: igt-dev@lists.freedesktop.org, Andrzej Turko , Petri Latvala List-ID: On Fri, 13 Aug 2021 00:46:59 -0700, Zbigniew Kempczy=F1ski wrote: > > @@ -512,10 +545,13 @@ static void prioinv(int fd, int dir, const intel_ct= x_t *ctx, > .rsvd1 =3D ctx->id, > }; > int64_t timeout =3D NSEC_PER_SEC; /* 1s, feeling generous, blame debug */ > - uint64_t ram, gtt, size =3D 4 << 20; > + uint64_t ram, gtt, ahnd, size =3D 4 << 20; > unsigned long count; > int link[2], dummy; > > + ahnd =3D get_reloc_ahnd(fd, ctx->id); > + obj.offset =3D get_offset(ahnd, obj.handle, 4096, 0); > + > igt_require(gem_scheduler_enabled(fd)); > igt_require(igt_params_set(fd, "reset", "%u", -1)); /* engine resets! */ > igt_require(gem_gpu_reset_type(fd) > 1); > @@ -544,7 +580,14 @@ static void prioinv(int fd, int dir, const intel_ctx= _t *ctx, > fd =3D gem_reopen_driver(fd); > igt_debug("Submitting large capture [%ld x %dMiB objects]\n", > count, (int)(size >> 20)); > - free(__captureN(fd, dir, ring, size, count, ASYNC)); > + > + intel_allocator_init(); > + /* Reopen the allocator in the new process. */ > + ahnd =3D get_reloc_ahnd(fd, 0); > + > + free(__captureN(fd, dir, ahnd, ring, size, count, ASYNC)); > + put_ahnd(ahnd); > + > write(link[1], &fd, sizeof(fd)); /* wake the parent up */ > igt_force_gpu_reset(fd); > write(link[1], &fd, sizeof(fd)); /* wake the parent up */ > @@ -567,19 +610,26 @@ static void prioinv(int fd, int dir, const intel_ct= x_t *ctx, > close(link[1]); > > gem_quiescent_gpu(fd); > + put_offset(ahnd, obj.handle); > + put_ahnd(ahnd); > + intel_allocator_multiprocess_stop(); Is this asymmetric intel_allocator_multiprocess_stop without a start needed? Otherwise this is: Reviewed-by: Ashutosh Dixit