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 47139C4332F for ; Tue, 1 Nov 2022 16:30:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A86F10E3F9; Tue, 1 Nov 2022 16:30:35 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 229CF10E3F9; Tue, 1 Nov 2022 16:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667320230; x=1698856230; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=jJAj2VVh1TLSErVYB6WuEeF2sdPhrU/4/LlGGSXAj6c=; b=h10lnwufjvNN6OuBO1J3mVisZNHYsUzq4ncXd2Yz4OE1w8/CWR/vRh5y Z6X4BnBOAa0cF3bup/FPbgsiovSgbLG6Tun0YV970lBpRjz6RlR0AiYQJ oMzC1zQfmP+0zg7zj46Ekn6bccV3iHdWLp7MpQPtV7ToXDtoStPdARxKU OjWK7xqvgkZSquFpLu5PoE74vPuZM2z4ph3vO14cYFDrSRQ3uZhAM6iGS NiY8NKB59nZOIIhWFG2hABwoPsCMNJS0ALbeHi8QwVup9mVqX314Eler4 +hdu0ONzs5AXI8Xl71Yax8cLSCmrQZnM56Phqb19TJ2GKZHsA3HSvbeAQ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="373396359" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="373396359" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 09:30:29 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="963180650" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="963180650" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.251.7.78]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 09:30:28 -0700 Date: Tue, 01 Nov 2022 09:25:36 -0700 Message-ID: <87sfj2d4lb.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: John Harrison In-Reply-To: <9fbc49e1-f651-f19b-d7b5-43ac02f12f9c@intel.com> References: <20221031222440.546-1-John.C.Harrison@Intel.com> <87tu3id7ao.wl-ashutosh.dixit@intel.com> <9fbc49e1-f651-f19b-d7b5-43ac02f12f9c@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/28.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] tests/sysfs: Update timeslice/preemption for new range limits 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, Intel-GFX@Lists.FreeDesktop.Org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 01 Nov 2022 09:22:11 -0700, John Harrison wrote: > > On 11/1/2022 08:27, Dixit, Ashutosh wrote: > > On Mon, 31 Oct 2022 15:24:40 -0700, John.C.Harrison@Intel.com wrote: > >> From: John Harrison > >> > >> Guc submission imposes new range limits on certain scheduling > >> parameters. The idempotent sections of the timeslice duration and > >> pre-emption timeout tests was exceeding those limits and so would fail. > >> > >> Reduce the excessively large value (654s) to one which does not > >> overflow (54s). Also add an assert that the write of the new value > >> actually succeeds. > >> > >> Signed-off-by: John Harrison > >> --- > >> tests/i915/sysfs_preempt_timeout.c | 4 ++-- > >> tests/i915/sysfs_timeslice_duration.c | 4 ++-- > >> 2 files changed, 4 insertions(+), 4 deletions(-) > >> > >> diff --git a/tests/i915/sysfs_preempt_timeout.c b/tests/i915/sysfs_preempt_timeout.c > >> index 515038281638..5e0a7d96299f 100644 > >> --- a/tests/i915/sysfs_preempt_timeout.c > >> +++ b/tests/i915/sysfs_preempt_timeout.c > >> @@ -68,7 +68,7 @@ static void set_preempt_timeout(int engine, unsigned int value) > >> { > >> unsigned int delay; > >> > >> - igt_sysfs_printf(engine, ATTR, "%u", value); > >> + igt_assert_lte(0, igt_sysfs_printf(engine, ATTR, "%u", value)); > >> igt_sysfs_scanf(engine, ATTR, "%u", &delay); > >> igt_assert_eq(delay, value); > >> } > >> @@ -82,7 +82,7 @@ static int wait_for_reset(int fence) > >> > >> static void test_idempotent(int i915, int engine) > >> { > >> - unsigned int delays[] = { 0, 1, 1000, 1234, 654321 }; > >> + unsigned int delays[] = { 0, 1, 1000, 1234, 54321 }; > > By way of documenting the difference between GuC and execlists, I think we > > should use gem_using_guc_submission and define two different arrays, one > > for execlists and the other for GuC? > I really don't think it is worth the effort. Is execlist mode ever going to > genuinely want an pre-emption timeout or execution quantum of 654s? And > note that this test is not actually testing the behaviour with those > values. It merely tests that it can set the value. There are other > behavioural tests and they max out at 0.5s. So I don't see any benefit to > adding in the extra complexity to verify that a certain range of values > passes on execlist but fails on GuC. > > > > > We could of course go the extra yard and check for errors with excessively > > large values but I'm not sure if that's worth it so am ok if we skip that > > at this point. Or that's a later patch. > The 'invalid' test already puts in 'excessively large' values and checks > that they are rejected. Fair enough: Reviewed-by: Ashutosh Dixit > > > > Below too. > > > > Thanks. > > -- > > Ashutosh > > > > > >> unsigned int saved; > >> > >> /* Quick test that store/show reports the same values */ > >> diff --git a/tests/i915/sysfs_timeslice_duration.c b/tests/i915/sysfs_timeslice_duration.c > >> index 8a2f1c2f2ece..95dc377785a5 100644 > >> --- a/tests/i915/sysfs_timeslice_duration.c > >> +++ b/tests/i915/sysfs_timeslice_duration.c > >> @@ -79,7 +79,7 @@ static void set_timeslice(int engine, unsigned int value) > >> { > >> unsigned int delay; > >> > >> - igt_sysfs_printf(engine, ATTR, "%u", value); > >> + igt_assert_lte(0, igt_sysfs_printf(engine, ATTR, "%u", value)); > >> igt_sysfs_scanf(engine, ATTR, "%u", &delay); > >> igt_assert_eq(delay, value); > >> } > >> @@ -93,7 +93,7 @@ static int wait_for_reset(int fence) > >> > >> static void test_idempotent(int i915, int engine) > >> { > >> - const unsigned int delays[] = { 0, 1, 1234, 654321 }; > >> + const unsigned int delays[] = { 0, 1, 1234, 54321 }; > >> unsigned int saved; > >> > >> /* Quick test to verify the kernel reports the same values as we write */ > >> -- > >> 2.37.3 > >> >