Re: [RFC PATCH v2 06/11] page-pool: add device memory support

From
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date
2023-08-19 16:12:21
Also in
dri-devel, linux-media
Reply to
Jesper Dangaard Brouer, 2023-08-19
quoted
Any regression in page pool can be avoided in the common case that
does not use device mem by placing that behind a static_branch. Would
that address your performance concerns?
No. This will not help.

The problem is that every where in the page_pool code it is getting
polluted with:

   if (page_is_page_pool_iov(page))
     call-some-iov-func-instead()

Like: the very central piece of getting the refcnt:

+static inline int page_pool_page_ref_count(struct page *page)
+{
+       if (page_is_page_pool_iov(page))
+               return page_pool_iov_refcount(page_to_page_pool_iov(page));
+
+       return page_ref_count(page);
+}


The fast-path of the PP is used for XDP_DROP scenarios, and is currently
around 14 cycles (tsc). Thus, any extra code in this code patch will
change the fast-path.
With static_branch disabled, it would only insert a NOP?
Thread (62 messages) 62 messages, 13 authors, last reply 2023-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help