Thread (62 messages) flat view 62 messages, 13 authors, 2023-09-08

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

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help