Skip to content

More lib/alloc cleanup and a minor improvement

Claudio Imbrenda kvm 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesApplied
  2. v14 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* rename helper function to alloc_vpages_aligned, call it directly
* alloc_vpages_aligned now expects a page order as alignment

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4lib/vmalloc: fix pages count local variable to be size_tlib/vmalloc.c+2 -21 reply
2/4lib/alloc_page: change some parameter typeslib/alloc_page.c lib/alloc_page.h+7 -72 replies
3/4lib/alloc_page: move get_order and is_power_of_2 to a bitops.hlib/alloc.c lib/alloc_page.c lib/alloc_page.h +2 more+11 -110 replies
4/4lib/vmalloc: allow vm_memalign with alignment > PAGE_SIZElib/vmalloc.c lib/vmalloc.h+30 -80 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesJim Mattson
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [kvm-unit-tests PATCH v2 0/4] More lib/alloc cleanup and a minor improvement

Some more cleanup of lib/alloc in light of upcoming changes

The first real feature: allow aligned virtual allocations with alignment greater than one page.

Also export a function for allocating aligned non-backed virtual pages.

v1->v2
* rename helper function to alloc_vpages_aligned, call it directly
* alloc_vpages_aligned now expects a page order as alignment

Claudio Imbrenda (4):
lib/vmalloc: fix pages count local variable to be size_t lib/alloc_page: change some parameter types lib/alloc_page: move get_order and is_power_of_2 to a bitops.h lib/vmalloc: allow vm_memalign with alignment > PAGE_SIZE

 lib/alloc_page.h |  7 +++----
 lib/bitops.h     | 10 ++++++++++
 lib/libcflat.h   |  5 -----
 lib/vmalloc.h    |  3 +++
 lib/alloc.c      |  1 +
 lib/alloc_page.c | 13 ++++---------
 lib/vmalloc.c    | 37 ++++++++++++++++++++++++++++---------
 7 files changed, 49 insertions(+), 27 deletions(-)
Signature · 1 line
2.26.2