Re: [RFC PATCH v2] media: renesas: vsp1: Add VSPD underrun detection & tracing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

On Tue, Jun 28, 2022 at 9:53 PM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Jun 28, 2022 at 09:05:34PM +0200, Eugeniu Rosca wrote:
> > On So, Jun 26, 2022 at 09:46:42 +0300, Laurent Pinchart wrote:
> > > On Tue, May 03, 2022 at 03:20:10PM +0200, Eugeniu Rosca wrote:
> > > >
> > > > Troubleshooting the above without the right tools becomes a nightmare.
> > >
> > > Having spent lots of time working in userspace recently, I can't agree
> > > more.
> >
> > Thanks for the feedback and for endorsing the utility of this patch.
> >
> > > > +static int vspd_underrun[VSPD_MAX_NUM];
> > > > +module_param_array(vspd_underrun, int, NULL, 0444);
> > > > +MODULE_PARM_DESC(vspd_underrun, "VSPD underrun counter");
> > >
> > > Module parameters are not meant to convey information back to userspace.
> > > This should be done through either a debugfs file or a sysfs file. Given
> > > the debugging nature of this feature, I'd recommend the former.
> >
> > It is a bit unfortunate that we have to go the debugFS route, since I
> > recall at least one Customer in the past, who disabled the debugFS in
> > the end product, since it was the only available means to meet the
> > stringent automotive requirements (w.r.t. KNL binary size). Anybody
> > who has no choice but to disable debugFS will consequently not be able
> > to take advantage of this patch in the production/release software.
>
> debugfs isn't meant to be enabled in production, so if you need a
> solution for production environment, it's not an option indeed.
>
> > If there is no alternative, then for sure I can go this way.
> >
> > However, before submitting PATCH v3, would you consider SYSFS viable
> > too, if keeping the module param is totally unacceptable?
> >
> > I was hoping to keep the number of external dependencies to the bare
> > minimum, hence the initial choice of module param. Looking forward to
> > your final suggestion/preference.
>
> sysfs would be my next recommendation. I don't think a Linux system can
> meaningfully run without sysfs, so it shouldn't be an issue
> dependency-wise.

Indeed, you can add a device attribute.
But as that is not a debug feature, the attribute must be documented,
and becomes ABI.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux