Subject: Re: [PATCH net-next v2 1/3] net: skb: plumb napi state thru skb freeing paths

From: Jakub Kicinski <[email-masked]>
Date: Thu, 13 Apr 2023 22:20:01 -0700

On Fri, 14 Apr 2023 08:57:03 +0800 Yunsheng Lin wrote:
> >> Does it break the single-producer single-consumer assumption of tx queue?  
> > 
> > We do not think so.  
> 
> Then I guess it is ok to do direct recycling for page pool case as it is
> per napi?

We're talking about the tx queue or the pp cache?
Those have different producers and consumers.

> It is per cpu cache case we are using !!bugget to protect it from preemption
> while netpoll_poll_dev() is running?

This is the scenario - We are feeding the page pool cache from the
deferred pages. An IRQ comes and interrupts us half way thru. 
netpoll then tries to also feed the page pool cache. Unhappiness.

Note that netpoll is activated extremely rarely (only when something
writes to the console), and even more rarely does it actually poll
for space in the Tx queue.