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 56FECC4332F for ; Tue, 1 Nov 2022 15:27:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B456910E3EB; Tue, 1 Nov 2022 15:27:15 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1458510E3EB; Tue, 1 Nov 2022 15:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667316434; x=1698852434; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=ggyDO4QbVKvSukRijHHpZ/appi3uGSReVl2UqWYU6mI=; b=TyO3TmJcQGNCwPYSi4YWijSbwArzxQ0VeokpPcQ64rJn0DrfsbKZb4p/ LZoPVt81I+8JrnhM7ImbjWfJVR8BpexSrx7q/Ax872tXNE9qYCM9mS3hj HO2DSemGFXt3xVfyQT7V7bboQKxIgXMUoB9IHgzuNgu/SvAivBrkv0H7w ve6TWdgKf5z5jYDv1ZSVY7iI+P+2jPi7XJlyI2XZEKpECdAIJO3g3K9fl LnbJ+rmi2chEcC+UrY59m7dQv33ddvA/GRJEIWDIggls/ESAVQMJNEAKn Qia7d9WuNUUMKBMw73pym5OXfJA2S2GLuiY9zYzx+2tcBZrny7YkKwZwJ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="309160758" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="309160758" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 08:27:13 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="611877665" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="611877665" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.251.7.78]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 08:27:13 -0700 Date: Tue, 01 Nov 2022 08:27:11 -0700 Message-ID: <87tu3id7ao.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: John.C.Harrison@Intel.com In-Reply-To: <20221031222440.546-1-John.C.Harrison@Intel.com> References: <20221031222440.546-1-John.C.Harrison@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 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? 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. 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 >