Thread (49 messages) flat view 49 messages, 4 authors, 2023-11-27

Re: [PATCH net-next v3 00/13] net: page_pool: add netlink-based introspection

From: Shakeel Butt <hidden>
Date: 2023-11-25 20:57:27

On Tue, Nov 21, 2023 at 07:44:07PM -0800, Jakub Kicinski wrote:
We recently started to deploy newer kernels / drivers at Meta,
making significant use of page pools for the first time.
We immediately run into page pool leaks both real and false positive
warnings. As Eric pointed out/predicted there's no guarantee that
applications will read / close their sockets so a page pool page
may be stuck in a socket (but not leaked) forever. This happens
a lot in our fleet. Most of these are obviously due to application
bugs but we should not be printing kernel warnings due to minor
application resource leaks.

Conversely the page pool memory may get leaked at runtime, and
we have no way to detect / track that, unless someone reconfigures
the NIC and destroys the page pools which leaked the pages.

The solution presented here is to expose the memory use of page
pools via netlink. This allows for continuous monitoring of memory
used by page pools, regardless if they were destroyed or not.
Sample in patch 15 can print the memory use and recycling
efficiency:

$ ./page-pool
    eth0[2]	page pools: 10 (zombies: 0)
		refs: 41984 bytes: 171966464 (refs: 0 bytes: 0)
		recycling: 90.3% (alloc: 656:397681 recycle: 89652:270201)
Hi Jakub, I am wondering if you considered to expose these metrics
through meminfo/vmstat as well, is that a bad idea or is this/netlink
more of a preference?

thanks,
Shakeel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help