On 4/26/24 8:11 PM, Mina Almasry wrote:
On Fri, Apr 26, 2024 at 5:18?PM David Wei dw@davidwei.uk wrote:
On 2024-04-02 5:20 pm, Mina Almasry wrote:
@@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov) */ typedef unsigned long __bitwise netmem_ref;
+static inline bool netmem_is_net_iov(const netmem_ref netmem) +{ +#if defined(CONFIG_PAGE_POOL) && defined(CONFIG_DMA_SHARED_BUFFER)
I am guessing you added this to try and speed up the fast path? It's overly restrictive for us since we do not need dmabuf necessarily. I spent a bit too much time wondering why things aren't working only to find this :(
My apologies, I'll try to put the changelog somewhere prominent, or notify you when I do something that I think breaks you.
Yes, this is a by-product of a discussion with regards to the page_pool benchmark regressions due to adding devmem. There is some background on why this was added and the impact on the bench_page_pool_simple tests in the cover letter.
For you, I imagine you want to change this to something like:
#if defined(CONFIG_PAGE_POOL) #if defined(CONFIG_DMA_SHARED_BUFFER) || defined(CONFIG_IOURING)
or something like that, right? Not sure if this is something I should do here or if something more appropriate to be in the patches you apply on top.
In general, attempting to hide overhead behind config options is always a losing proposition. It merely serves to say "look, if these things aren't enabled, the overhead isn't there", while distros blindly enable pretty much everything and then you're back where you started.