mbox series

[kvm-unit-tests,v1,0/4] More lib/alloc cleanup and a minor improvement

Message ID 20200703115109.39139-1-imbrenda@linux.ibm.com (mailing list archive)
Headers show
Series More lib/alloc cleanup and a minor improvement | expand

Message

Claudio Imbrenda July 3, 2020, 11:51 a.m. UTC
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.

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    | 42 +++++++++++++++++++++++++++++++++---------
 7 files changed, 54 insertions(+), 27 deletions(-)

Comments

Andrew Jones July 3, 2020, 12:30 p.m. UTC | #1
On Fri, Jul 03, 2020 at 01:51:05PM +0200, Claudio Imbrenda wrote:
> 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.
> 
> 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    | 42 +++++++++++++++++++++++++++++++++---------
>  7 files changed, 54 insertions(+), 27 deletions(-)
> 
> -- 
> 2.26.2
>

For the series

Reviewed-by: Andrew Jones <drjones@redhat.com>