Re: [PATCH v1] bpf: Add kernel-doc for struct bpf_prog_info

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

 



On Wed, Sep 3, 2025 at 9:01 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
>
> > >         __aligned_u64 prog_tags;
> > > +       /**
> > > +        * @run_time_ns: The total accumulated execution time of the program in
> > > +        * nanoseconds.
> > > +        */
> >
> > Missing critical detail that the kernel doesn't keep counting it all the time.
>
> I'm not sure what you mean by this? Do you think the comment is saying
> that the run_time is the run_time since loading? But it says
> "accumulated execution time" which would imply only time spent
> executing. When is it not counting?
>
> > >         __u64 run_time_ns;
> > > +       /**
> > > +        * @run_cnt: The total number of times the program has been executed.
> > > +        */
> >
> > ditto
>
> Shouldn't the purpose of run_time_ns and run_cnt to be to calculate an
> average run_time? If these are arbitrary values, what's the point?
> Again, why isn't this explained? Thank you for helping me to try to
> fix this. I'm also happy for others to fix this and this patch to be
> completely ignored. It can be ignored in all scenarios, I was just
> trying to be helpful to others and probably my future self at some
> point.

Posting a patch generated by AI without proof reading is not ok.
Wrong documentation is much worse than no documentation.
If you don't know what these fields do don't add random comments
to them. Read the code and document based on your understanding.
Copy pasting AI and throwing it at maintainers to review is inconsiderate.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux