Re:Re: Re: Re: Re: [PATCH] media:v4l2-async:debugfs for registered subdevices

From: luo.liu.linux

Date: Tue Mar 17 2026 - 07:15:56 EST




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.

Kind regards,

Luo



At 2026-03-17 16:21:31, "Sakari Ailus" <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
>Hi Luo,
>
>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.
>
>--
>Kind regards,
>
>Sakari Ailus