Re: [kvm-unit-tests PATCH v1 4/4] lib/vmalloc: allow vm_memalign with alignment > PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/07/20 15:49, Claudio Imbrenda wrote:
> On Fri, 3 Jul 2020 14:30:01 +0200
> Andrew Jones <drjones@xxxxxxxxxx> wrote:
> 
> [...]
> 
>>> -void *alloc_vpages(ulong nr)
>>> +/*
>>> + * Allocate a certain number of pages from the virtual address
>>> space (without
>>> + * physical backing).
>>> + *
>>> + * nr is the number of pages to allocate
>>> + * alignment_pages is the alignment of the allocation *in pages*
>>> + */
>>> +static void *alloc_vpages_intern(ulong nr, unsigned int
>>> alignment_pages)  
>>
>> This helper function isn't necessary. Just introduce
>> alloc_vpages_aligned() and then call alloc_vpages_aligned(nr, 1) from
>> alloc_vpages().
> 
> the helper will actually be useful in future patches.
> 
> maybe I should have written that in the patch description.
> 
> I can respin without helper if you prefer (and introduce it when
> needed) or simply update the patch description.

Would it make sense, for your future patches, to keep the helper (but
don't abbrev. "internal" :)) and make it get an order instead of the
number of pages?

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux