Re: [PATCH linux-next v2] net: record times of netdev_budget exhausted

From: Eric Dumazet
Date: Mon Dec 05 2022 - 22:18:33 EST


On Tue, Dec 6, 2022 at 2:53 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Mon, 5 Dec 2022 09:36:12 +0800 (CST) yang.yang29@xxxxxxxxxx wrote:
> > A long time ago time_squeeze was used to only record netdev_budget
> > exhausted[1]. Then we added netdev_budget_usecs to enable softirq
> > tuning[2]. And when polling elapsed netdev_budget_usecs, it's also
> > record by time_squeeze.
> > For tuning netdev_budget and netdev_budget_usecs respectively, we'd
> > better distinguish from netdev_budget exhausted and netdev_budget_usecs
> > elapsed, so add budget_exhaust to record netdev_budget exhausted.
> >
> > [1] commit 1da177e4c3f4("Linux-2.6.12-rc2")
> > [2] commit 7acf8a1e8a28("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning")
>
> Same comments as on v1.

Yes, and if we really want to track all these kinds of events the
break caused by need_resched() in do_softirq would
also need some monitoring.

I feel that more granular tracing (did I say tracepoints) would be more useful.