All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Latypov <dlatypov@google.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: tzimmermann@suse.de, airlied@linux.ie,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"José Expósito" <jose.exposito89@gmail.com>,
	kunit-dev@googlegroups.com
Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()
Date: Thu, 2 Jun 2022 09:53:10 -0700	[thread overview]
Message-ID: <CAGS_qxpFO4ixW=08ZcdcD9J1kU=B3mwoBJkPW8AKu0sKs8aKfA@mail.gmail.com> (raw)
In-Reply-To: <e26de140-afb7-7b1b-4826-6ac4f3a4fe02@redhat.com>

On Thu, Jun 2, 2022 at 9:27 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> > +CFLAGS_drm_format_helper_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)
> >
>
> A comment on why this is needed would useful.

Ah, I think that should not be necessary anymore.
We added this to some tests to mitigate against compilers that didn't
optimize away stack-local structs used internally in KUNIT_EXPECT*.
Functions with ~30 or so EXPECTs could get flagged for excessively
large stack frames.

But in 5.18, I had some patches to reduce the naive stack usage from
[48..88] => [8..32] bytes per EXPECT.
I also have some RFC patches out to get it down to [0, 24] bytes.

So going forward, this should only be necessary if you have something
like 100s of EXPECTs in a single function (in which case you should
also consider splitting that function up).

Daniel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Latypov <dlatypov@google.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: "José Expósito" <jose.exposito89@gmail.com>,
	tzimmermann@suse.de, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kunit-dev@googlegroups.com
Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()
Date: Thu, 2 Jun 2022 09:53:10 -0700	[thread overview]
Message-ID: <CAGS_qxpFO4ixW=08ZcdcD9J1kU=B3mwoBJkPW8AKu0sKs8aKfA@mail.gmail.com> (raw)
In-Reply-To: <e26de140-afb7-7b1b-4826-6ac4f3a4fe02@redhat.com>

On Thu, Jun 2, 2022 at 9:27 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> > +CFLAGS_drm_format_helper_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)
> >
>
> A comment on why this is needed would useful.

Ah, I think that should not be necessary anymore.
We added this to some tests to mitigate against compilers that didn't
optimize away stack-local structs used internally in KUNIT_EXPECT*.
Functions with ~30 or so EXPECTs could get flagged for excessively
large stack frames.

But in 5.18, I had some patches to reduce the naive stack usage from
[48..88] => [8..32] bytes per EXPECT.
I also have some RFC patches out to get it down to [0, 24] bytes.

So going forward, this should only be necessary if you have something
like 100s of EXPECTs in a single function (in which case you should
also consider splitting that function up).

Daniel

  reply	other threads:[~2022-06-02 16:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 10:20 [RFC PATCH 0/1] KUnit tests for drm_format_helper José Expósito
2022-05-30 10:20 ` José Expósito
2022-05-30 10:20 ` [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() José Expósito
2022-05-30 10:20   ` José Expósito
2022-05-30 13:11   ` Maxime Ripard
2022-05-30 13:11     ` Maxime Ripard
2022-05-30 16:29     ` José Expósito
2022-05-30 16:29       ` José Expósito
2022-05-30 22:57       ` Daniel Latypov
2022-05-30 22:57         ` Daniel Latypov
2022-05-31 18:44         ` José Expósito
2022-05-31 18:44           ` José Expósito
2022-05-31 20:42           ` Daniel Latypov
2022-05-31 20:42             ` Daniel Latypov
2022-06-02 17:12       ` David Gow
2022-06-02 17:12         ` David Gow
2022-06-02 17:29         ` Javier Martinez Canillas
2022-06-02 17:29           ` Javier Martinez Canillas
2022-06-02 17:45           ` Daniel Latypov
2022-06-02 17:45             ` Daniel Latypov
2022-05-31  5:17   ` kernel test robot
2022-06-02 16:26   ` Javier Martinez Canillas
2022-06-02 16:26     ` Javier Martinez Canillas
2022-06-02 16:53     ` Daniel Latypov [this message]
2022-06-02 16:53       ` Daniel Latypov
2022-06-02 17:07     ` David Gow
2022-06-02 17:07       ` David Gow
2022-06-02 17:21       ` Javier Martinez Canillas
2022-06-02 17:21         ` Javier Martinez Canillas
2022-06-06  9:43         ` José Expósito
2022-06-06  9:43           ` José Expósito

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='CAGS_qxpFO4ixW=08ZcdcD9J1kU=B3mwoBJkPW8AKu0sKs8aKfA@mail.gmail.com' \
    --to=dlatypov@google.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jose.exposito89@gmail.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.