[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b1d25fe8fa06420c8420d0f2ee81e1ed@baidu.com>
Date: Tue, 17 Dec 2024 01:58:29 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, "saeedm@...dia.com"
<saeedm@...dia.com>, "tariqt@...dia.com" <tariqt@...dia.com>,
"leon@...nel.org" <leon@...nel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"kuba@...nel.org" <kuba@...nel.org>, "edumazet@...gle.com"
<edumazet@...gle.com>, "davem@...emloft.net" <davem@...emloft.net>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>
CC: "Li,Shuo(ACG CCN)" <lishuo02@...du.com>
Subject: 答复: [外部邮件] Re: [PATCH][net-next] net/mlx5e: avoid to call net_dim and dim_update_sample
> On 12/12/2024 11:47, Li RongQing wrote:
> > High cpu usage for net_dim is seen still after commit 61bf0009a765
> > ("dim: pass dim_sample to net_dim() by reference"), the calling
> > net_dim can be avoid under network low throughput or pingpong mode by
> > checking the event counter, even under high throughput, it maybe only
> > rx or tx direction
> >
> > And don't initialize dim_sample variable, since it will gets
> > overwritten by dim_update_sample
>
> dim_update_sample doesn't init dim_sample::comp_ctr, which is later used in
> net_dim()->dim_calc_stats(). This change can bring uninitialized memory to the
> whole calculation. Keep it initialized.
>
I see that comp_ctr is only for RDMA dim, so it is best to move the comp_ctr calculation to a RDMA dim related function.
To this patch, move the initialization before dim_update_sample() to avoid unnecessary initialization
Thanks
-Li
Powered by blists - more mailing lists