RE: [PATCH v8 09/11] media: chips-media: wave6: Add performance profiling

From: Nas Chung

Date: Wed Nov 25 2026 - 20:34:44 EST


Hi, Frank.

>-----Original Message-----
>From: Frank Li <Frank.li@xxxxxxxxxxx>
>Sent: Thursday, November 26, 2026 4:37 AM
>To: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
>Cc: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>; Detlev Casanova
><detlev.casanova@xxxxxxxxxxxxx>; mchehab@xxxxxxxxxx; hverkuil@xxxxxxxxxx;
>robh@xxxxxxxxxx; krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx; Frank.Li@xxxxxxx;
>s.hauer@xxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx;
>devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>imx@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
>festevam@xxxxxxxxx; kernel@xxxxxxxxxxxxxx; ming.qian@xxxxxxxxxxx;
>marek.vasut@xxxxxxxxxxx; jackson.lee <jackson.lee@xxxxxxxxxxxxxxx>;
>lafley.kim <lafley.kim@xxxxxxxxxxxxxxx>
>Subject: Re: [PATCH v8 09/11] media: chips-media: wave6: Add performance
>profiling
>
>On Wed, Nov 25, 2026 at 06:06:05AM +0000, Nas Chung wrote:
>> Hi, Nicolas.
>>
>> >-----Original Message-----
>> >From: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
>> >Sent: Tuesday, November 24, 2026 5:26 AM
>> >To: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>; Frank Li
><Frank.li@xxxxxxxxxxx>;
>> >Detlev Casanova <detlev.casanova@xxxxxxxxxxxxx>
>> >Cc: mchehab@xxxxxxxxxx; hverkuil@xxxxxxxxxx; robh@xxxxxxxxxx;
>> >krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx; Frank.Li@xxxxxxx;
>> >s.hauer@xxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx;
>> >devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>> >imx@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
>> >festevam@xxxxxxxxx; kernel@xxxxxxxxxxxxxx; ming.qian@xxxxxxxxxxx;
>> >marek.vasut@xxxxxxxxxxx; jackson.lee <jackson.lee@xxxxxxxxxxxxxxx>;
>> >lafley.kim <lafley.kim@xxxxxxxxxxxxxxx>
>> >Subject: Re: [PATCH v8 09/11] media: chips-media: wave6: Add performance
>> >profiling
>> >
>> >Hi,
>> >
>> >Le lundi 23 novembre 2026 à 09:18 +0000, Nas Chung a écrit :
>> >> Hi, Frank.
>> >>
>> >> > -----Original Message-----
>> >> > From: Frank Li <Frank.li@xxxxxxxxxxx>
>> >> > Sent: Friday, November 20, 2026 5:56 AM
>> >> > To: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
>> >> > Cc: mchehab@xxxxxxxxxx; hverkuil@xxxxxxxxxx; robh@xxxxxxxxxx;
>> >> > krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx; Frank.Li@xxxxxxx;
>> >> > s.hauer@xxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx;
>> >> > devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>> >> > imx@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
>> >> > festevam@xxxxxxxxx; kernel@xxxxxxxxxxxxxx;
>> >nicolas.dufresne@xxxxxxxxxxxxx;
>> >> > ming.qian@xxxxxxxxxxx; marek.vasut@xxxxxxxxxxx; jackson.lee
>> >> > <jackson.lee@xxxxxxxxxxxxxxx>; lafley.kim
><lafley.kim@xxxxxxxxxxxxxxx>
>> >> > Subject: Re: [PATCH v8 09/11] media: chips-media: wave6: Add
>> >performance
>> >> > profiling
>> >> >
>> >> > On Thu, Nov 19, 2026 at 06:00:03PM +0900, Nas Chung wrote:
>> >> > > Add per-instance performance profiling to help identify whether a
>> >> > > throughput problem comes from the firmware or from the host side.
>> >> >
>> >> > why not register as perf interface?
>> >>
>> >> The numbers are kept per instance (per open file). Each instance has
>> >> its own fps, latency and min/max frame time, and they are updated each
>> >> time one of its frames is done.
>> >>
>> >> As far as I know, perf can only count per CPU or per task, and a
>device
>> >> PMU usually counts for the whole system. So perf would only show the
>> >> total of all instances, and we could not get the min/max frame time
>> >> from it.
>> >
>> >My preference would then go toward .fdinfo() then instead of custom
>debug
>> >fs. It
>> >gives the FD owner the right to see the statistics and not just root.
>> >Here's an
>> >example of in progress attempt. The idea is that some key would be
>> >generalized
>> >and documented and some other key would be driver specific (e.g. wave6-
>> >prefix).
>>
>> Agreed, fdinfo fits better since the owner of the file handle can
>> read the statistics, not only root. Common keys would also let tools
>> like v4l2top read the same statistics across V4L2 drivers.
>>
>> >
>> >https://lore.kernel.org/all/20260706-v4l2-add-fdinfo-v3-0-
>> >d556568cf38e@xxxxxxxxxxxxx/
>> >
>> >Then once we've upstream v4l2top, one can track the performance live,
>and
>> >you
>> >can even add driver specific metrics.
>>
>> As V4L2 fdinfo is not merged yet, I'd like to keep the debugfs file
>> in the series for now. I'll follow the fdinfo series, and once it is
>> merged, I'll switch the statistics to fdinfo and drop the debugfs
>> output.
>
>statistics is not credital part for function. It'd better skip statistics
>information patch in series, and add it later after fdinfo merged.

OK. I'll drop this patch in v9.

Thanks.
Nas.

>
>Frank
>
>>
>> Thanks.
>> Nas.
>>
>> >
>> >Nicolas
>> >
>> >>
>> >> Thanks.
>> >> Nas.
>> >>
>> >> >
>> >> > Frank
>> >> >