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 F0095C8303C for ; Tue, 8 Jul 2025 07:41:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5D9410E5AD; Tue, 8 Jul 2025 07:41:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; secure) header.d=ffwll.ch header.i=@ffwll.ch header.b="OLQ0AFKl"; dkim-atps=neutral Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8392010E5B0 for ; Tue, 8 Jul 2025 07:41:50 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4537fdec39fso11546195e9.0 for ; Tue, 08 Jul 2025 00:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1751960509; x=1752565309; darn=lists.freedesktop.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=nLXLpWrN0RrjvzjS9bZYXIrunV11kVzsxvUhFkoafL4=; b=OLQ0AFKlF5YmoYTl5dUXJTp0ORF9I5aEMJp3VBZy8kQZNwdDP0HDU6zQoy9FBVLBSg NNeItHWp5hL4cIky2CqyTliko1o8oOLyBhwdtaJgJl4xomXNFNBrOUwVLUX3GCQ3fkSl WAVtDT3QSGHX4clwxUz+I1KsozUg6skPW2kSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751960509; x=1752565309; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nLXLpWrN0RrjvzjS9bZYXIrunV11kVzsxvUhFkoafL4=; b=c2L24zFc5vrjbNecUmboMP+NTUPVrPn9z/XcN2do8b/3qN01t2UrU7sol3bOToFXxW 6M5GYg6B9bsEdrIS7EccbgnvlvEbjTROLOjDbF52qCT+VfRwNYODh5/hGHy6D6BOiUgS nZISZMRaDHrYayGDkNUckhVuQabXT+hHzMiXucZRYZYsK/n2VpYjDkGjpAE84Nk2iHqU xSM2Ewalw3VFmdO+DDVqsbJOY23j1Rc2f8cSyMQsRbJ0DcVFvoZjw/1xtoTxfeIGlrBZ 8rnjqSGLfRRk2RB2lMUpLWIxsw+5tFVIaRkkFCgrDl/WZx+sFJH/GjyagSJHDDnrh1nB qFSQ== X-Forwarded-Encrypted: i=1; AJvYcCWgREp3DIUWCXSOyb8ThqC5ggJkTXekcGxJ4yi6RIr7gIWD6fMjKNnNxdj1YjKqyHDEqXnVDptj4Q==@lists.freedesktop.org X-Gm-Message-State: AOJu0YwxB3NT/0OIR5iNwQ/xhmHL/uOSbtGcX/3mkudTI1Q2uLyqLhtq FDgqSSrXeTSodViZKT9A5edqKGBadxp4I3uQM4YGOpDh/27on8eyBWFCczPRCb99sgw= X-Gm-Gg: ASbGnctFrUmMash79au1CeHC0upDZHmz2+YFVndpjShwxAnfjcjIjuZmjuszirDtFt/ /Sa2nhLIbbspzVe0Ufj26B0/t0bYS9GpDIhxMhqhh2/K9Q2Mp+jJSSQ1pYdM7zeIDwesgXITSci BqLP/Kg7CnI8swUw3spcjiPTrKiwGyTrfGdDj7JIughDFy2/lTXSN7g4ZzUT1iGvDpeotK1eNQr UarxpVxWyK5/i25cERh/HX1UKI9yOiF6qkYF9FqlWn4r3WDT2LQXZqiTtrZnIT2jBFs+YHOLuQV eWnOn4iRw6LkSB5w88jsXFxcbHcm0U0ZD/oouWxa6/fZ3FHiG1/J+2kDpqzJuTWMnoeGMyHBDg= = X-Google-Smtp-Source: AGHT+IFDYYh+YQVkLMo6VtvD9z1aU3v2ebhZ3f3RUOuyw4wPvIZHoVbSHZ7xWZtnTf0OIsFwsLRcQQ== X-Received: by 2002:a05:600c:a3a5:b0:453:5a04:b60e with SMTP id 5b1f17b1804b1-454b3ab9b26mr100685635e9.26.1751960508889; Tue, 08 Jul 2025 00:41:48 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b4708d0ae0sm12458327f8f.33.2025.07.08.00.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jul 2025 00:41:48 -0700 (PDT) Date: Tue, 8 Jul 2025 09:41:46 +0200 From: Simona Vetter To: =?iso-8859-1?Q?Ma=EDra?= Canal Cc: Matthew Brost , Danilo Krummrich , Philipp Stanner , Christian =?iso-8859-1?Q?K=F6nig?= , Tvrtko Ursulin , Simona Vetter , David Airlie , Melissa Wen , Lucas Stach , Russell King , Christian Gmeiner , Lucas De Marchi , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Rodrigo Vivi , Boris Brezillon , Rob Herring , Steven Price , Liviu Dudau , kernel-dev@igalia.com, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, intel-xe@lists.freedesktop.org Subject: Re: [PATCH v4 3/8] drm/sched: Make timeout KUnit tests faster Message-ID: References: <20250707-sched-skip-reset-v4-0-036c0f0f584f@igalia.com> <20250707-sched-skip-reset-v4-3-036c0f0f584f@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250707-sched-skip-reset-v4-3-036c0f0f584f@igalia.com> X-Operating-System: Linux phenom 6.12.30-amd64 X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Mon, Jul 07, 2025 at 11:46:32AM -0300, Maíra Canal wrote: > As more KUnit tests are introduced to evaluate the basic capabilities of > the `timedout_job()` hook, the test suite will continue to increase in > duration. To reduce the overall running time of the test suite, decrease > the scheduler's timeout for the timeout tests. > > Before this commit: > > [15:42:26] Elapsed time: 15.637s total, 0.002s configuring, 10.387s building, 5.229s running > > After this commit: > > [15:45:26] Elapsed time: 9.263s total, 0.002s configuring, 5.168s building, 4.037s running > > Signed-off-by: Maíra Canal > Reviewed-by: Tvrtko Ursulin > Acked-by: Philipp Stanner > --- > drivers/gpu/drm/scheduler/tests/tests_basic.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c > index 7230057e0594c6246f02608f07fcb1f8d738ac75..41c648782f4548e202bd8711b45d28eead9bd0b2 100644 > --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c > +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c > @@ -5,6 +5,8 @@ > > #include "sched_tests.h" > > +#define MOCK_TIMEOUT (HZ / 5) Eventually I think we want a test interface to immediately time out jobs by rescheduling their timer to immediately (and handling all the trickery of making sure it's scheduled first). That could also help with testcases that want to exercise specific timing. But for now this seems good enough. -Sima > + > /* > * DRM scheduler basic tests should check the basic functional correctness of > * the scheduler, including some very light smoke testing. More targeted tests, > @@ -28,7 +30,7 @@ static void drm_sched_basic_exit(struct kunit *test) > > static int drm_sched_timeout_init(struct kunit *test) > { > - test->priv = drm_mock_sched_new(test, HZ); > + test->priv = drm_mock_sched_new(test, MOCK_TIMEOUT); > > return 0; > } > @@ -227,14 +229,14 @@ static void drm_sched_basic_timeout(struct kunit *test) > done = drm_mock_sched_job_wait_scheduled(job, HZ); > KUNIT_ASSERT_TRUE(test, done); > > - done = drm_mock_sched_job_wait_finished(job, HZ / 2); > + done = drm_mock_sched_job_wait_finished(job, MOCK_TIMEOUT / 2); > KUNIT_ASSERT_FALSE(test, done); > > KUNIT_ASSERT_EQ(test, > job->flags & DRM_MOCK_SCHED_JOB_TIMEDOUT, > 0); > > - done = drm_mock_sched_job_wait_finished(job, HZ); > + done = drm_mock_sched_job_wait_finished(job, MOCK_TIMEOUT); > KUNIT_ASSERT_FALSE(test, done); > > KUNIT_ASSERT_EQ(test, > > -- > 2.50.0 > -- Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch