Re: [PATCH net-next 1/3] net: netpoll: Defer skb_pool population until setup success

From: Breno Leitao
Date: Thu Nov 07 2024 - 06:51:29 EST


Hello Jakub,

On Wed, Nov 06, 2024 at 03:43:49PM -0800, Jakub Kicinski wrote:
> On Wed, 6 Nov 2024 07:06:06 -0800 Breno Leitao wrote:
> > To clarify, let me take a step back and outline what this patchset proposes:
> >
> > The patchset enhances SKB pool management in three key ways:
> >
> > a) It delays populating the skb pool until the target is active.
> > b) It releases the skb pool when there are no more active users.
> > c) It creates a separate pool for each target.
> >
> > The third point (c) is the one that's open to discussion, as I
> > understand.
> >
> > I proposed that having an individualized skb pool that users can control
> > would be beneficial. For example, users could define the number of skbs
> > in the pool. This could lead to additional advantages, such as allowing
> > netpoll to directly consume from the pool instead of relying on alloc()
> > in the optimal scenario, thereby speeding up the critical path.
>
> Patch 1 is the one I'm not completely convinced by. I understand
> the motivation but its rather unusual to activate partially initialized
> objects. Maybe let's leave it out.
>
> The rest is fine, although I'd invert the justification for the second
> patch. We should in fact scale the number of pooled packets with the
> number of consoles. Each message gets send to every console so system
> with 2 netconsoles has effectively half the OOM cushion.

That is fair. Thanks for the guidance. I will keep patch 1 out of it and
send a v2.

Thanks
--breno