intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: "Michał Winiarski" <michal@hardline.pl>, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v2 5/7] drm/xe/reg_sr: Save errors for kunit integration
Date: Mon, 3 Apr 2023 16:43:28 -0700	[thread overview]
Message-ID: <20230403234328.pky6pthsfaqxtc2e@ldmartin-desk2.lan> (raw)
In-Reply-To: <20230403231125.GC4085390@mdroper-desk1.amr.corp.intel.com>

On Mon, Apr 03, 2023 at 04:11:25PM -0700, Matt Roper wrote:
>On Sat, Apr 01, 2023 at 01:51:49AM -0700, Lucas De Marchi wrote:
>> When there's an entry that is dropped when xe_reg_sr_add(), there's
>> not much we can do other than reporting the error - it's for certain a
>> driver issue or conflicting workarounds/tunings. Save the number of
>> errors to be used later by kunit to report where it happens.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
>Does xe_reg_sr ever get allocated on the stack on with a non-zeroed
>allocation?  I didn't think it did (it looks like they're always part of
>the original xe_device allocation which was kzalloc'd), but I see
>xe_reg_sr_init() explicitly zeroing the sr->pool substructure so it made
>me second-guess myself.
>
>Assuming I'm reading correctly that we never have an xe_reg_sr that
>wasn't zeroed at allocation,

when I wrote that part I think it was to allow init -> fini -> init.
But with the drm-managed part that didn't work.  For the same reason,
sr can't be on stack - it will just crash if we try.

So... those memset in both init and fini look redundant now and can be
removed in a cleanup patch.

>
>Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

thanks
Lucas De Marchi

  reply	other threads:[~2023-04-03 23:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  8:51 [Intel-xe] [PATCH v2 0/7] Unit tests for rtp and GT wa/tuning Lucas De Marchi
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 1/7] drm/xe: Extract function to initialize xe->info Lucas De Marchi
2023-04-03 22:33   ` Matt Roper
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 2/7] drm/xe: Move test infra out of xe_pci.[ch] Lucas De Marchi
2023-04-03 22:42   ` Matt Roper
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 3/7] drm/xe: Use symbol namespace for kunit tests Lucas De Marchi
2023-04-03 17:00   ` Mauro Carvalho Chehab
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 4/7] drm/xe: Generalize fake device creation Lucas De Marchi
2023-04-03 22:58   ` Matt Roper
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 5/7] drm/xe/reg_sr: Save errors for kunit integration Lucas De Marchi
2023-04-03 23:11   ` Matt Roper
2023-04-03 23:43     ` Lucas De Marchi [this message]
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 6/7] drm/xe: Add basic unit tests for rtp Lucas De Marchi
2023-04-03 11:33   ` Michał Winiarski
2023-04-01  8:51 ` [Intel-xe] [PATCH v2 7/7] drm/xe: Add test for GT workarounds and tunings Lucas De Marchi
2023-04-03 13:14   ` Michał Winiarski
2023-04-01  9:12 ` [Intel-xe] ✓ CI.Patch_applied: success for Unit tests for rtp and GT wa/tuning (rev2) Patchwork
2023-04-01  9:14 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-04-01  9:17 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-04-01  9:37 ` [Intel-xe] ○ CI.BAT: info " Patchwork

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=20230403234328.pky6pthsfaqxtc2e@ldmartin-desk2.lan \
    --to=lucas.demarchi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=michal@hardline.pl \
    /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).