[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231207205956.GJ50400@kernel.org>
Date: Thu, 7 Dec 2023 20:59:56 +0000
From: Simon Horman <horms@...nel.org>
To: Pedro Tammela <pctammela@...atatu.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us,
marcelo.leitner@...il.com, vladbu@...dia.com,
Jiri Pirko <jiri@...dia.com>, Victor Nogueira <victor@...atatu.com>
Subject: Re: [PATCH net-next v3 1/5] rtnl: add helper to check if rtnl group
has listeners
On Wed, Dec 06, 2023 at 01:44:12PM -0300, Pedro Tammela wrote:
> From: Jamal Hadi Salim <jhs@...atatu.com>
>
> As of today, rtnl code creates a new skb and unconditionally fills and
> broadcasts it to the relevant group. For most operations this is okay
> and doesn't waste resources in general.
>
> When operations are done without the rtnl_lock, as in tc-flower, such
> skb allocation, message fill and no-op broadcasting can happen in all
> cores of the system, which contributes to system pressure and wastes
> precious cpu cycles when no one will receive the built message.
>
> Introduce this helper so rtnetlink operations can simply check if someone
> is listening and then proceed if necessary.
>
> Reviewed-by: Jiri Pirko <jiri@...dia.com>
> Signed-off-by: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: Victor Nogueira <victor@...atatu.com>
> Signed-off-by: Pedro Tammela <pctammela@...atatu.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists