From: Andi Shyti <andi.shyti@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Chris Wilson <chris.p.wilson@linux.intel.com>
Subject: Re: [PATCH] drm/i915/gt: Continue creating engine sysfs files even after a failure
Date: Sat, 24 Aug 2024 00:26:04 +0200 [thread overview]
Message-ID: <ZskMfOwgVYpVbsqa@ashyti-mobl2.lan> (raw)
In-Reply-To: <ZsiRi0i80gRqTOIg@intel.com>
Hi Rodrigo,
On Fri, Aug 23, 2024 at 09:41:31AM -0400, Rodrigo Vivi wrote:
> On Wed, Aug 21, 2024 at 09:32:48AM +0200, Andi Shyti wrote:
> > On Tue, Aug 20, 2024 at 05:22:40PM -0400, Rodrigo Vivi wrote:
> > > On Mon, Aug 19, 2024 at 01:31:40PM +0200, Andi Shyti wrote:
...
> > > > It might make sense to create an "inv-<engine_name>" if something
> > > > goes wrong, so that the user is aware that the engine exists, but
> > > > the sysfs file is not present.
> > >
> > > well, if the sysfs dir/files creation is failing, then it will
> > > probably be unreliable anyway right?
> >
> > Are you suggesting that "inv-<engine_name>" is OK?
>
> it is okay I guess.
> But my point is more on, how are we going to create this if
> the creation mechanism is what is likely failing here.
We can fail for different reasons... but yeah you are right, it
doesn't make much sense, as also the creation of "inv-<...>"
interfaces might be unreliable.
> > > Also it looks something is off with the goto paths...
> > >
> > > That if (0) is also ugly... probably better to use a
> > > kobject_put with continue on every failing point as well...
> >
> > ehehe... I came to like it, to be honest. Besides I like single
> > exit paths instead of distributed returns. In this particular
> > case we would replcate the same "kobject_put() ... dev_warn()" in
> > several places, so that I'm not sure it's better.
> >
> > If you like more we could do:
> >
> > for (...) {
> > ...
> > ...
> > /* everything goes fine */
> > continue
> >
> > err_engine:
> > kobject_put(...);
> > dev_warn(...);
> > }
> >
> > And we avoid using the "if (0)" that you don't like.
>
> nah, no strong feeling from my side. It is there, let's
> avoid unnecessary refactors.
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> on this patch as is. And sorry for the delay.
Thanks a lot for your review :-)
Andi
next prev parent reply other threads:[~2024-08-23 22:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 11:31 [PATCH] drm/i915/gt: Continue creating engine sysfs files even after a failure Andi Shyti
2024-08-19 12:06 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-20 6:58 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-20 21:22 ` [PATCH] " Rodrigo Vivi
2024-08-21 7:32 ` Andi Shyti
2024-08-21 10:34 ` Andi Shyti
2024-08-23 13:41 ` Rodrigo Vivi
2024-08-23 22:26 ` Andi Shyti [this message]
2024-08-27 17:05 ` Daniel Vetter
2024-08-28 20:17 ` Rodrigo Vivi
2024-09-04 13:20 ` Andi Shyti
2024-09-04 14:34 ` Jani Nikula
2024-09-04 15:08 ` Tvrtko Ursulin
2024-09-04 15:13 ` Rodrigo Vivi
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=ZskMfOwgVYpVbsqa@ashyti-mobl2.lan \
--to=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@ursulin.net \
/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