rust: allocator: Vmalloc: Support alignments larger than PAGE_SIZE
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vmalloc: Add vrealloc_align to support allocation of aligned vmap pagesinclude/ mm/ | +57 | 1 reply | |
| 2/3 | rust: allocator: Vmalloc: Support alignments larger than PAGE_SIZErust/ rust/ | +27 | 0 replies | |
| 3/3 | rust: add a sample allocator usagesamples/ samples/ samples/ | +115 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] rust: allocator: Vmalloc: Support alignments larger than PAGE_SIZE
From: Hui Zhu <[email protected]>
There is a TODO in Vmalloc::realloc "Support alignments larger than PAGE_SIZE."
These commits make allocator vmalloc support alignments larger than PAGE_SIZE.
The function vrealloc_align is added to vmalloc.c to support reallocating aligned vmap pages.
When Vmalloc::realloc intends to reallocate memory aligned beyond PAGE_SIZE, vrealloc_align should be used instead of vrealloc, thus enabling support for alignments larger than PAGE_SIZE.
And add a sample to the samples memory allocator usage.
Hui Zhu (3):
vmalloc: Add vrealloc_align to support allocation of aligned vmap
pages
rust: allocator: Vmalloc: Support alignments larger than PAGE_SIZE
rust: add a sample allocator usage
include/linux/vmalloc.h | 5 ++ mm/vmalloc.c | 80 ++++++++++++++++--------- rust/helpers/vmalloc.c | 7 +++ rust/kernel/alloc/allocator.rs | 32 ++++++---- samples/rust/Kconfig | 10 ++++ samples/rust/Makefile | 1 + samples/rust/rust_allocator.rs | 104 +++++++++++++++++++++++++++++++++ 7 files changed, 199 insertions(+), 40 deletions(-) create mode 100644 samples/rust/rust_allocator.rs
Signature · 1 line
2.43.0