Re: Re: Re: Re: Re: [PATCH] media:v4l2-async:debugfs for registered subdevices
From: Laurent Pinchart
Date: Thu Mar 19 2026 - 16:40:29 EST
On Tue, Mar 17, 2026 at 07:14:43PM +0800, luo.liu.linux wrote:
>
> Hi Sakari,
>
> The existing pending_async_subdevices interface provides excellent
> visibility into the notifier_list (the 'waiter' side).
>
> To achieve full symmetry and complete debuggability, we should also
> expose the subdev_list (the 'provider' side).These two views solve
> different problems:
>
> 1 Notifier List: Diagnoses why binding is stalled (missing sub-devices).
>
> 2 Subdev List: Diagnoses state inconsistencies (e.g., sub-devices
> present but unmatched) and verifies resource cleanup upon unbind.
>
> From practical experience, lacking visibility into subdev_list makes
> it difficult to distinguish between a sub-device probe failure and an
> async matching failure.
>
> Adding this interface would provide a holistic view of the async
> engine's state, which has proven essential for rapid issue
> localization in complex driver stacks.
I agree with Sakari here. There are plenty of other debugging tools in
the kernel that can be used to diagnose the kind of issues you've
described. I think this patch adds more noise than value.
> At 2026-03-17 16:21:31, Sakari Ailus wrote:
> > On Tue, Mar 17, 2026 at 11:37:52AM +0800, luo.liu.linux wrote:
> >>
> >> Hi Sakari,
> >>
> >> You are absolutely right. For an experienced kernel developer like
> >> yourself, tools like KASAN and CONFIG_DEBUG_LIST are second nature and
> >> incredibly effective for pinpointing such issues. I truly admire your
> >> expertise in leveraging these advanced debugging mechanisms.
> >>
> >> However, I think it is important to consider the reality for many
> >> junior driver developers (myself included). We often lack the deep
> >> intuition and extensive experience required to wield these powerful tools
> >> effectively in every scenario. More often than not, we still rely on
> >> primitive methods: struggling to reproduce intermittent crashes,
> >> scattering printk logs everywhere, and manually tracing execution paths.
> >> This process is extremely time-consuming and often yields no clear
> >> conclusions for "silent" resource leaks.
> >>
> >> While I am actively working to improve my skills and learn to use
> >> these advanced tools more proficiently. I remain convinced that providing
> >> such a simple, intuitive interface offers a necessary supplement by
> >> serving as a low-barrier entry point for developers.
> >>
> >> I hope this perspective clarifies why I believe this small change
> >> can bring a bit of convenience to a broader range of driver developers.
> >
> > Just enable KASAN and list debugging in the future. New interfaces like
> > this won't improve things at large.
--
Regards,
Laurent Pinchart