[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC_iWjJiTddh7cKo-18LGGE+XQS_H8B5ieXLW6+uSq6uBNPnDw@mail.gmail.com>
Date: Mon, 3 Apr 2023 18:30:55 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, hawk@...nel.org
Subject: Re: [RFC net-next 1/2] page_pool: allow caching from safely localized NAPI
On Mon, 3 Apr 2023 at 18:05, Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 3 Apr 2023 12:16:04 +0300 Ilias Apalodimas wrote:
> > > /* If the page refcnt == 1, this will try to recycle the page.
> > > * if PP_FLAG_DMA_SYNC_DEV is set, we'll try to sync the DMA area for
> > > * the configured size min(dma_sync_size, pool->max_len).
> > > @@ -570,6 +583,9 @@ __page_pool_put_page(struct page_pool *pool, struct page *page,
> > > page_pool_dma_sync_for_device(pool, page,
> > > dma_sync_size);
> > >
> > > + if (!allow_direct)
> > > + allow_direct = page_pool_safe_producer(pool);
> > > +
> >
> > Do we want to hide the decision in __page_pool_put_page(). IOW wouldn't it
> > be better for this function to honor whatever allow_direct dictates and
> > have the allow_direct = page_pool_safe_producer(pool); in callers?
>
> Meaning in page_pool_return_skb_page() or all the way from
> napi_consume_skb()? The former does indeed sounds like a good idea!
page_pool_return_skb_page() (and maybe page_pool_put_full_page()).
FWIW we completely agree on napi_consume_skb(). We are trying to keep
page_pool and the net layer as disjoint as possible. The only point
we 'pollute' networking code is the recycle bit checking and we'd
prefer keeping it like that
Regards
/Ilias
Powered by blists - more mailing lists