From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFBE6C433F5 for ; Thu, 24 Mar 2022 17:39:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6446510E411; Thu, 24 Mar 2022 17:39:50 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F63C10E307; Thu, 24 Mar 2022 17:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648143589; x=1679679589; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=lckEO8rqkCfuTp47c08Wi7ZHUgOhczHY6ySSojZmr5U=; b=LR45Hvpo503+Mvpg6bfv3p+wy2QfsRxGsnjB4WoFdF+YcoWyvlRWokcB 3HxPM4IcJ3UW165wBn46bjr8/srUt9mSnonWyUegIjHg+I2vGe76d0cO3 boD8vr1yl5JIpc7ac4qp0SGAI5yLUBdQGWYwE+UnxL0v/uru84gH7UCLE h9efT4R7gbd8BuRE9WdgLNnEkOyglLkjR1WWKnxcPXXDQEpP85BjRjt8I nTOrLGAcBIvOS3iswKcLY83NWlJB01GCWtuhQMY62aRHctZ9ecQbQPs0Z cdeLfeRvGbyY9DbyG6pVetdx+Q+mlgN8d4AHDETHp1ilU76SNX/9nFY9f Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10296"; a="283308119" X-IronPort-AV: E=Sophos;i="5.90,208,1643702400"; d="scan'208";a="283308119" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 10:39:48 -0700 X-IronPort-AV: E=Sophos;i="5.90,208,1643702400"; d="scan'208";a="717913141" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.252.135.167]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 10:39:48 -0700 Date: Thu, 24 Mar 2022 10:39:48 -0700 Message-ID: <87h77ndzbv.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Matthew Auld In-Reply-To: <20220324142621.347452-3-matthew.auld@intel.com> References: <20220324142621.347452-1-matthew.auld@intel.com> <20220324142621.347452-3-matthew.auld@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 2/4] test/gem_lmem_swapping: fix physical engine usage X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, Thomas =?ISO-8859-1?Q?Hellstr=F6m?= , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 24 Mar 2022 07:26:19 -0700, Matthew Auld wrote: > > @@ -353,14 +356,17 @@ static void test_evict(int i915, > if (flags & TEST_PARALLEL) { > int fd = gem_reopen_driver(i915); > > + ctx = intel_ctx_create_all_physical(fd); > + __gem_context_set_persistence(i915, ctx->id, false); > + > igt_fork(child, nproc) > - __do_evict(fd, ®ion->region, ¶ms, > + __do_evict(fd, ctx, ®ion->region, ¶ms, > params.seed + child + 1); > > igt_waitchildren(); > close(fd); We might introduce some memory leak tests some time so it would be good to destroy any contexts we create with intel_ctx_destroy(). > @@ -528,17 +536,20 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) > for_each_physical_engine(i915, e) > __num_engines__++; > igt_require(__num_engines__); > + ctx = intel_ctx_create_all_physical(i915); > + __gem_context_set_persistence(i915, ctx->id, false); > + > } > > for (test = tests; test->name; test++) { > igt_describe("Exercise local memory swapping to system memory"); > dynamic_lmem_subtest(region, regions, test->name) > - test_evict(i915, region, test->flags); > + test_evict(i915, ctx, region, test->flags); > } > > igt_describe("Exercise local memory swapping during exhausting system memory"); > dynamic_lmem_subtest(region, regions, "smem-oom") > - test_smem_oom(i915, region); > + test_smem_oom(i915, ctx, region); > > igt_fixture { > free(regions); Here too.