-
Notifications
You must be signed in to change notification settings - Fork 6
support large align and nid in Rust allocators #5582
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
base: bpf-next_base
Are you sure you want to change the base?
support large align and nid in Rust allocators #5582
Conversation
Upstream branch: ad97cb2 |
Upstream branch: ad97cb2 |
1f13ca9
to
4c6e317
Compare
80ee250
to
20e8c30
Compare
Upstream branch: d81526a |
4c6e317
to
35f6ff9
Compare
20e8c30
to
bccc07c
Compare
Reimplement vrealloc() to be able to set node and alignment should a user need to do so. Rename the function to vrealloc_node_align() to better match what it actually does now and introduce macros for vrealloc() and friends for backward compatibility. With that change we also provide the ability for the Rust part of the kernel to set node and alignment in its allocations. Signed-off-by: Vitaly Wool <[email protected]> Reviewed-by: Uladzislau Rezki (Sony) <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]>
Reimplement k[v]realloc_node() to be able to set node and alignment should a user need to do so. In order to do that while retaining the maximal backward compatibility, add k[v]realloc_node_align() functions and redefine the rest of API using these new ones. While doing that, we also keep the number of _noprof variants to a minimum, which implies some changes to the existing users of older _noprof functions, that basically being bcachefs. With that change we also provide the ability for the Rust part of the kernel to set node and alignment in its K[v]xxx [re]allocations. Signed-off-by: Vitaly Wool <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]>
Add a new type to support specifying NUMA identifiers in Rust allocators and extend the allocators to have NUMA id as a parameter. Thus, modify ReallocFunc to use the new extended realloc primitives from the C side of the kernel (i. e. k[v]realloc_node_align/vrealloc_node_align) and add the new function alloc_node to the Allocator trait while keeping the existing one (alloc) for backward compatibility. This will allow to specify node to use for allocation of e. g. {KV}Box, as well as for future NUMA aware users of the API. Signed-off-by: Vitaly Wool <[email protected]>
Add support for large (> PAGE_SIZE) alignments in Rust allocators. All the preparations on the C side are already done, we just need to add bindings for <alloc>_node_align() functions and start using those. Signed-off-by: Vitaly Wool <[email protected]> Acked-by: Danilo Krummrich <[email protected]>
Upstream branch: eeec23a |
35f6ff9
to
15650b8
Compare
Pull request for series with
subject: support large align and nid in Rust allocators
version: 12
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=980623