From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
netdev@vger.kernel.org, davem@davemloft.net,
lorenzo.bianconi@redhat.com, mcroce@redhat.com,
jonathan.lemon@gmail.com
Subject: Re: [PATCH v5 net-next 2/3] net: page_pool: add the possibility to sync DMA memory for device
Date: Wed, 20 Nov 2019 20:00:38 +0200 [thread overview]
Message-ID: <20191120180038.GA26040@apalos.home> (raw)
In-Reply-To: <20191120184901.59306f16@carbon>
> [...]
> > @@ -281,8 +309,8 @@ static bool __page_pool_recycle_direct(struct page *page,
> > return true;
> > }
> >
> > -void __page_pool_put_page(struct page_pool *pool,
> > - struct page *page, bool allow_direct)
> > +void __page_pool_put_page(struct page_pool *pool, struct page *page,
> > + unsigned int dma_sync_size, bool allow_direct)
> > {
> > /* This allocator is optimized for the XDP mode that uses
> > * one-frame-per-page, but have fallbacks that act like the
> > @@ -293,6 +321,10 @@ void __page_pool_put_page(struct page_pool *pool,
> > if (likely(page_ref_count(page) == 1)) {
> > /* Read barrier done in page_ref_count / READ_ONCE */
> >
> > + if (pool->p.flags & PP_FLAG_DMA_SYNC_DEV)
> > + page_pool_dma_sync_for_device(pool, page,
> > + dma_sync_size);
> > +
> > if (allow_direct && in_serving_softirq())
> > if (__page_pool_recycle_direct(page, pool))
> > return;
>
> I am slightly concerned this touch the fast-path code. But at-least on
> Intel, I don't think this is measurable. And for the ARM64 board it
> was a huge win... thus I'll accept this.
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
next prev parent reply other threads:[~2019-11-20 18:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 14:54 [PATCH v5 net-next 0/3] add DMA-sync-for-device capability to page_pool API Lorenzo Bianconi
2019-11-20 14:54 ` [PATCH v5 net-next 1/3] net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp Lorenzo Bianconi
2019-11-20 15:45 ` Jesper Dangaard Brouer
2019-11-20 14:54 ` [PATCH v5 net-next 2/3] net: page_pool: add the possibility to sync DMA memory for device Lorenzo Bianconi
2019-11-20 17:49 ` Jesper Dangaard Brouer
2019-11-20 18:00 ` Ilias Apalodimas [this message]
2019-11-20 18:42 ` Jonathan Lemon
2019-11-20 19:04 ` Jesper Dangaard Brouer
2019-11-20 14:54 ` [PATCH v5 net-next 3/3] net: mvneta: get rid of huge dma sync in mvneta_rx_refill Lorenzo Bianconi
2019-11-20 17:49 ` Jesper Dangaard Brouer
2019-11-20 15:37 ` [PATCH v5 net-next 0/3] add DMA-sync-for-device capability to page_pool API Jesper Dangaard Brouer
2019-11-20 15:45 ` Lorenzo Bianconi
2019-11-20 18:05 ` Ilias Apalodimas
2019-11-20 20:34 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191120180038.GA26040@apalos.home \
--to=ilias.apalodimas@linaro.org \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=jonathan.lemon@gmail.com \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=mcroce@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).