dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: David Gow <davidgow@google.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: "Arthur Grillo" <arthur.grillo@usp.br>,
	siqueirajordao@riseup.net, "David Airlie" <airlied@linux.ie>,
	"Daniel Latypov" <dlatypov@google.com>,
	brendanhiggins@google.com, dri-devel@lists.freedesktop.org,
	linux-kselftest@vger.kernel.org, n@nfraprado.net,
	"Isabella Basso" <isabbasso@riseup.net>,
	andrealmeid@riseup.net, magalilemes00@gmail.com,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	mwen@igalia.com, "Shuah Khan" <skhan@linuxfoundation.org>,
	kunit-dev@googlegroups.com, michal.winiarski@intel.com,
	"Maíra Canal" <maira.canal@usp.br>,
	linux-kernel@vger.kernel.org, leandro.ribeiro@collabora.com,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	tales.aparecida@gmail.com,
	"José Expósito" <jose.exposito89@gmail.com>
Subject: Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit
Date: Tue, 25 Jul 2023 17:54:32 +0800	[thread overview]
Message-ID: <CABVgOSmtZVfuLNBXymVfeuv_997TanhR3R_=Sk0sJL359jhw7Q@mail.gmail.com> (raw)
In-Reply-To: <j4twjg4rd74qq6wjr7nrtrtkh6cdxehuw5lmeavu7z5q5lhtih@nofkcrdnwty7>

[-- Attachment #1: Type: text/plain, Size: 2987 bytes --]

On Tue, 25 Jul 2023 at 16:38, Maxime Ripard <mripard@kernel.org> wrote:
>
> Hi,
>
> On Thu, Apr 27, 2023 at 03:14:39PM +0200, Maxime Ripard wrote:
> > Hi,
> >
> > On Fri, Jul 08, 2022 at 05:30:52PM -0300, Maíra Canal wrote:
> > > From: Arthur Grillo <arthur.grillo@usp.br>
> > >
> > > Considering the current adoption of the KUnit framework, convert the
> > > DRM mm selftest to the KUnit API.
> > >
> > > Signed-off-by: Arthur Grillo <arthur.grillo@usp.br>
> > > Tested-by: David Gow <davidgow@google.com>
> > > Acked-by: Daniel Latypov <dlatypov@google.com>
> > > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> > > Signed-off-by: Maíra Canal <maira.canal@usp.br>
> >
> > I'm very late to the party, but I'd like to discuss that patch some more.
> >
> > Two tests (drm_test_mm_reserve, drm_test_mm_insert) in it take a super
> > long time to run (about 30s each on my machine).
> >
> > If we run all the DRM tests and VC4 tests, each of those two are longer
> > to run than all the ~300 tests combined. About 100 times longer.
> >
> > I don't think that running for so long is reasonable, and for multiple
> > reasons:
> >
> >   - While I don't know drm_mm well, it doesn't look like any of those
> >     tests do something that really should take this long. I'm especially
> >     skeptical about the fact that we test each operation 8192 times by
> >     default.
> >
> >   - It makes using kunit more tedious than it should be. Like I said, on
> >     a very capable machine, running the all the DRM and VC4 tests takes
> >     about 50s with those two tests, ~0.4s without.
> >
> >   - The corollary is that it will get in the way of people that really
> >     want to use kunit will just remove those tests before doing so,
> >     defeating the original intent.
> >
> >
> > I understand that it came from selftests initially, but I think we
> > should rewrite the tests entirely to have smaller, faster tests. It's
> > not clear to me why those tests are as complicated as they are though.
> >
> > Also, going forward we should probably put disencourage tests running
> > that long. Could Kunit timeout/warn after a while if a test is taking
> > more than X seconds to run?
>
> I'd still like to address this. We spend ~90% of the DRM kunit tests
> execution time executing those two tests, which doesn't seem like a
> reasonable thing to do.

FWIW, KUnit is going to add a "speed" attribute for tests, so that
it's easy to skip tests which are slow:
https://lore.kernel.org/linux-kselftest/20230724162834.1354164-3-rmoar@google.com/T/#u

This would allow the slow tests to be marked using KUNIT_CASE_SLOW(),
and then be run via kunit.py --filter "speed>slow".

It obviously doesn't make the tests themselves any faster, but could
at least make it possible to run only the fast tests during
development, and the full, slower set before sending the patches out
(or in CI), for example.

-- David

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]

  reply	other threads:[~2023-07-25  9:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 20:30 [PATCH v5 0/9] drm: selftest: Convert to KUnit Maíra Canal
2022-07-08 20:30 ` [PATCH v5 1/9] drm: selftest: convert drm_damage_helper selftest " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 2/9] drm: selftest: convert drm_cmdline_parser " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 3/9] drm: selftest: convert drm_rect " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 4/9] drm: selftest: convert drm_format " Maíra Canal
2022-07-14 23:51   ` Guenter Roeck
2022-07-15  0:03     ` Daniel Latypov
2022-07-15  6:59       ` Javier Martinez Canillas
2022-07-15 11:43         ` Maíra Canal
2022-07-17 17:48       ` Maíra Canal
2022-07-15  0:04     ` Guenter Roeck
2022-07-08 20:30 ` [PATCH v5 5/9] drm: selftest: convert drm_plane_helper " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 6/9] drm: selftest: convert drm_dp_mst_helper " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 7/9] drm: selftest: convert drm_framebuffer " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 8/9] drm: selftest: convert drm_buddy " Maíra Canal
2022-07-08 20:30 ` [PATCH v5 9/9] drm: selftest: convert drm_mm " Maíra Canal
2022-07-22 10:35   ` Matthew Auld
2022-07-22 11:04     ` Maíra Canal
2022-07-22 16:25       ` Michał Winiarski
2022-08-21 22:22         ` Isabella Basso
2022-08-24  0:46           ` Michał Winiarski
2023-04-27 13:14   ` Maxime Ripard
2023-07-25  8:38     ` Maxime Ripard
2023-07-25  9:54       ` David Gow [this message]
2023-07-31 12:18         ` Maxime Ripard
2022-07-11 16:56 ` [PATCH v5 0/9] drm: selftest: Convert " Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABVgOSmtZVfuLNBXymVfeuv_997TanhR3R_=Sk0sJL359jhw7Q@mail.gmail.com' \
    --to=davidgow@google.com \
    --cc=airlied@linux.ie \
    --cc=andrealmeid@riseup.net \
    --cc=arthur.grillo@usp.br \
    --cc=brendanhiggins@google.com \
    --cc=dlatypov@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=isabbasso@riseup.net \
    --cc=javierm@redhat.com \
    --cc=jose.exposito89@gmail.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=leandro.ribeiro@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=magalilemes00@gmail.com \
    --cc=maira.canal@usp.br \
    --cc=michal.winiarski@intel.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=n@nfraprado.net \
    --cc=siqueirajordao@riseup.net \
    --cc=skhan@linuxfoundation.org \
    --cc=tales.aparecida@gmail.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).