kho: add support for preserving vmalloc allocations
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 13 repliesIn review 3 of 4 applied
- v44 patches 7 repliesSuperseded
- v3 posting 3/32 patches 17 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 posting 2/3 | 2 patches | 0 replies | Superseded | |
| v2 posting 2/2 | 2 patches | 1 reply | Superseded | |
| v3 posting 1/3 | 0 of 2 patches | 0 replies | Superseded | |
| v2 posting 1/2 | 2 patches | 0 replies | Superseded | |
| v1 | 2 patches | 6 replies | Superseded |
Changes in v5 from the cover letter
* rebase on mm-new of September 17
* use kho_restore_pages() in kho_restore_vmalloc(). Required to resolve a conflict with "kho: make sure page being restored is actually from KHO"
* use more descriptive local variable names in kho_restore_vmalloc()
Patches in v5 3 of 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | kho: check if kho is finalized in __kho_preserve_order()kernel/ | +26 | 0 replies | Applied |
| 2/4 | kho: replace kho_preserve_phys() with kho_preserve_pages()include/ kernel/ mm/ | +17 | 2 replies | Applied |
| 3/4 | kho: add support for preserving vmalloc allocationsinclude/ kernel/ | +309 | 11 replies | |
| 4/4 | lib/test_kho: use kho_preserve_vmalloc instead of storing addresses in fdtlib/ | +29 | 0 replies | Applied |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Pratyush Yadav | Jason Gunthorpe |
|---|---|---|
| 1/4 | R-b | |
| 2/4 | R-b | R-b |
| 3/4 | R-b R-b | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/4] kho: add support for preserving vmalloc allocations
From: "Mike Rapoport (Microsoft)" <[email protected]>
Hi,
Following the discussion about preservation of memfd with LUO [1] these patches add support for preserving vmalloc allocations.
Any KHO uses case presumes that there's a data structure that lists physical addresses of preserved folios (and potentially some additional metadata). Allowing vmalloc preservations with KHO allows scalable preservation of such data structures.
For instance, instead of allocating array describing preserved folios in the fdt, memfd preservation can use vmalloc:
preserved_folios = vmalloc_array(nr_folios, sizeof(*preserved_folios));
memfd_luo_preserve_folios(preserved_folios, folios, nr_folios);
kho_preserve_vmalloc(preserved_folios, &folios_info);[1] https://lore.kernel.org/all/[email protected]
v5 changes:
* rebase on mm-new of September 17
* use kho_restore_pages() in kho_restore_vmalloc(). Required to resolve a conflict with "kho: make sure page being restored is actually from KHO"
* use more descriptive local variable names in kho_restore_vmalloc()
v4: https://lore.kernel.org/all/[email protected]
* rebase on mm-stable
* use 'struct kho_vmalloc' as preservation metadata instead of storing it in the first chunk
* separate KHO flags from VM_ flags
* unreserve vmalloc pages on error
* add checks for under- and overflow of preserved metadata
v3: https://lore.kernel.org/all/[email protected]
* rebase on mm-unstable
v2: https://lore.kernel.org/all/[email protected]
* support preservation of vmalloc backed by large pages
* add check for supported vmalloc flags and preserve the flags to be able to identify incompatible preservations
* don't use kho_preserve_phys()
* add kernel-doc
v1: https://lore.kernel.org/all/[email protected]
Mike Rapoport (Microsoft) (4):
kho: check if kho is finalized in __kho_preserve_order()
kho: replace kho_preserve_phys() with kho_preserve_pages()
kho: add support for preserving vmalloc allocations lib/test_kho: use kho_preserve_vmalloc instead of storing addresses in
fdt
include/linux/kexec_handover.h | 33 ++- kernel/kexec_handover.c | 361 +++++++++++++++++++++++++++++---- lib/test_kho.c | 41 ++-- mm/memblock.c | 4 +- 4 files changed, 381 insertions(+), 58 deletions(-)
base-commit: c565f9816932dc8d164bd8c69acf077840565ce7
Signature · 1 line
2.50.1