Message ID | 20230804180529.2483231-1-aleksander.lobakin@intel.com (mailing list archive) |
---|---|
Headers | show |
Series | page_pool: a couple of assorted optimizations | expand |
On Fri, 2023-08-04 at 20:05 +0200, Alexander Lobakin wrote: > That initially was a spin-off of the IAVF PP series[0], but has grown > (and shrunk) since then a bunch. In fact, it consists of three > semi-independent blocks: > > * #1-2: Compile-time optimization. Split page_pool.h into 2 headers to > not overbloat the consumers not needing complex inline helpers and > then stop including it in skbuff.h at all. The first patch is also > prereq for the whole series. > * #3: Improve cacheline locality for users of the Page Pool frag API. > * #4-6: Use direct cache recycling more aggressively, when it is safe > obviously. In addition, make sure nobody wants to use Page Pool API > with disabled interrupts. > > Patches #1 and #5 are authored by Yunsheng and Jakub respectively, with > small modifications from my side as per ML discussions. > For the perf numbers for #3-6, please see individual commit messages. > > Also available on my GH with many more Page Pool goodies[1]. > > [0] https://lore.kernel.org/netdev/20230530150035.1943669-1-aleksander.lobakin@intel.com > [1] https://github.com/alobakin/linux/commits/iavf-pp-frag > > Alexander Lobakin (4): > net: skbuff: don't include <net/page_pool/types.h> to <linux/skbuff.h> > page_pool: place frag_* fields in one cacheline > net: skbuff: avoid accessing page_pool if !napi_safe when returning > page > net: skbuff: always try to recycle PP pages directly when in softirq > > Jakub Kicinski (1): > page_pool: add a lockdep check for recycling in hardirq > > Yunsheng Lin (1): > page_pool: split types and declarations from page_pool.h So the series mostly looks good to me. My only concern would be with path 5 since I am not sure why we are just throwing a WARN_ON when we could just take action on the info to prevent the problem in the first place. That said the change doesn't hurt anything as-is so I would be good with us thinking about changing that as a follow-up. Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Fri, 4 Aug 2023 20:05:23 +0200 you wrote: > That initially was a spin-off of the IAVF PP series[0], but has grown > (and shrunk) since then a bunch. In fact, it consists of three > semi-independent blocks: > > * #1-2: Compile-time optimization. Split page_pool.h into 2 headers to > not overbloat the consumers not needing complex inline helpers and > then stop including it in skbuff.h at all. The first patch is also > prereq for the whole series. > * #3: Improve cacheline locality for users of the Page Pool frag API. > * #4-6: Use direct cache recycling more aggressively, when it is safe > obviously. In addition, make sure nobody wants to use Page Pool API > with disabled interrupts. > > [...] Here is the summary with links: - [net-next,v4,1/6] page_pool: split types and declarations from page_pool.h https://git.kernel.org/netdev/net-next/c/a9ca9f9ceff3 - [net-next,v4,2/6] net: skbuff: don't include <net/page_pool/types.h> to <linux/skbuff.h> https://git.kernel.org/netdev/net-next/c/75eaf63ea7af - [net-next,v4,3/6] page_pool: place frag_* fields in one cacheline https://git.kernel.org/netdev/net-next/c/06d0fbdad612 - [net-next,v4,4/6] net: skbuff: avoid accessing page_pool if !napi_safe when returning page https://git.kernel.org/netdev/net-next/c/5b899c33b3b8 - [net-next,v4,5/6] page_pool: add a lockdep check for recycling in hardirq https://git.kernel.org/netdev/net-next/c/ff4e538c8c3e - [net-next,v4,6/6] net: skbuff: always try to recycle PP pages directly when in softirq https://git.kernel.org/netdev/net-next/c/4a36d0180c45 You are awesome, thank you!
From: Patchwork-Bot+netdevbpf <patchwork-bot+netdevbpf@kernel.org> Date: Mon, 07 Aug 2023 20:20:23 +0000 > Hello: > > This series was applied to netdev/net-next.git (main) > by Jakub Kicinski <kuba@kernel.org>: Just got back from the long weekend and saw that mail, nice :D Thanks! > > On Fri, 4 Aug 2023 20:05:23 +0200 you wrote: >> That initially was a spin-off of the IAVF PP series[0], but has grown >> (and shrunk) since then a bunch. In fact, it consists of three >> semi-independent blocks: >> >> * #1-2: Compile-time optimization. Split page_pool.h into 2 headers to >> not overbloat the consumers not needing complex inline helpers and >> then stop including it in skbuff.h at all. The first patch is also >> prereq for the whole series. >> * #3: Improve cacheline locality for users of the Page Pool frag API. >> * #4-6: Use direct cache recycling more aggressively, when it is safe >> obviously. In addition, make sure nobody wants to use Page Pool API >> with disabled interrupts. >> >> [...] > > Here is the summary with links: > - [net-next,v4,1/6] page_pool: split types and declarations from page_pool.h > https://git.kernel.org/netdev/net-next/c/a9ca9f9ceff3 > - [net-next,v4,2/6] net: skbuff: don't include <net/page_pool/types.h> to <linux/skbuff.h> > https://git.kernel.org/netdev/net-next/c/75eaf63ea7af > - [net-next,v4,3/6] page_pool: place frag_* fields in one cacheline > https://git.kernel.org/netdev/net-next/c/06d0fbdad612 > - [net-next,v4,4/6] net: skbuff: avoid accessing page_pool if !napi_safe when returning page > https://git.kernel.org/netdev/net-next/c/5b899c33b3b8 > - [net-next,v4,5/6] page_pool: add a lockdep check for recycling in hardirq > https://git.kernel.org/netdev/net-next/c/ff4e538c8c3e > - [net-next,v4,6/6] net: skbuff: always try to recycle PP pages directly when in softirq > https://git.kernel.org/netdev/net-next/c/4a36d0180c45 > > You are awesome, thank you! Thanks, Olek