New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split page pools from struct page #4126
Conversation
Upstream branch: f8186bf |
c658e2c
to
96164dd
Compare
Upstream branch: 59b8436 |
53758de
to
8e3edb3
Compare
96164dd
to
8eb0bd8
Compare
Upstream branch: 996c060 |
8e3edb3
to
0330c69
Compare
8eb0bd8
to
45e5b41
Compare
Upstream branch: c67cae5 |
0330c69
to
84f8394
Compare
45e5b41
to
9860b49
Compare
Upstream branch: 89903dc |
84f8394
to
53574b3
Compare
9860b49
to
85c0283
Compare
As part of simplifying struct page, create a new netmem type which mirrors the page_pool members in struct page. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
netmem_page() is defined this way to preserve constness. page_netmem() doesn't call compound_head() because netmem users always use the head page; it does include a debugging assert to check that it's true. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Turn page_pool_set_dma_addr() and page_pool_get_dma_addr() into wrappers. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
…em() Also convert page_pool_clear_pp_info() and trace_page_pool_state_release() to take a netmem. Include a wrapper for page_pool_release_page() to avoid converting all callers. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Convert __page_pool_alloc_page_order() and __page_pool_alloc_pages_slow() to use netmem internally. This removes a couple of calls to compound_head() that are hidden inside put_page(). Convert trace_page_pool_state_hold(), page_pool_dma_map() and page_pool_set_pp_info() to take a netmem argument. Saves 83 bytes of text in __page_pool_alloc_page_order() and 98 in __page_pool_alloc_pages_slow() for a total of 181 bytes. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Removes a call to compound_head(), saving 464 bytes of kernel text as page_pool_return_page() is inlined seven times. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Removes the call to compound_head() hidden in put_page() which saves 169 bytes of kernel text as __page_pool_put_page() is inlined twice. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Change the type here from page to netmem. It works out well to convert page_pool_refill_alloc_cache() to return a netmem instead of a page as part of this commit. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Add a page_pool_defrag_page() wrapper. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Also convert page_pool_is_last_frag(), page_pool_put_page(), page_pool_recycle_in_ring() and use netmem in page_pool_put_page_bulk(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Retrieve a netmem from the ptr_ring instead of a page. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Add a page_pool_alloc_pages() compatibility wrapper. Also convert __page_pool_alloc_pages_slow() to __page_pool_alloc_netmem_slow() and __page_pool_alloc_page_order() to __page_pool_alloc_netmem(). __page_pool_get_cached() is converted to return a netmem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Change all callers. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Removes a few casts. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This wrapper is no longer used. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
We're not quite ready to change the API of page_pool_drain_frag(), but we can remove the use of several wrappers by using the netmem throughout. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This function accesses the pagepool members of struct page directly, so it needs to become netmem. Add page_pool_put_full_netmem(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Remove page_pool_defrag_page() and page_pool_return_page() as they have no more callers. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
We dereference the 'pp' member of struct page, so we must use a netmem here. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
These are now split out into their own netmem struct. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Convert the only user of init_callback. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Allow drivers to add netmem to skbs & retrieve them again. If the VM_BUG_ON triggers, we can add a call to compound_head() either in this function or in page_netmem(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Upstream branch: 3144bfa |
Use the netmem APIs instead of the page APIs. Improves type-safety. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
53574b3
to
ebc6a26
Compare
85c0283
to
ab07846
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=700610 expired. Closing PR. |
Pull request for series with
subject: Split page pools from struct page
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=700610