kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, thuth@redhat.com,
	david@redhat.com
Subject: Re: [kvm-unit-tests PATCH v1 4/4] lib/vmalloc: allow vm_memalign with alignment > PAGE_SIZE
Date: Fri, 3 Jul 2020 18:20:43 +0200	[thread overview]
Message-ID: <14ab47ea-0c26-f124-6757-56c465569bfd@redhat.com> (raw)
In-Reply-To: <20200703154942.6a6513bc@ibm-vm>

On 03/07/20 15:49, Claudio Imbrenda wrote:
> On Fri, 3 Jul 2020 14:30:01 +0200
> Andrew Jones <drjones@redhat.com> 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


  reply	other threads:[~2020-07-03 16:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 11:51 [kvm-unit-tests PATCH v1 0/4] More lib/alloc cleanup and a minor improvement Claudio Imbrenda
2020-07-03 11:51 ` [kvm-unit-tests PATCH v1 1/4] lib/vmalloc: fix pages count local variable to be size_t Claudio Imbrenda
2020-07-03 11:51 ` [kvm-unit-tests PATCH v1 2/4] lib/alloc_page: change some parameter types Claudio Imbrenda
2020-07-03 11:51 ` [kvm-unit-tests PATCH v1 3/4] lib/alloc_page: move get_order and is_power_of_2 to a bitops.h Claudio Imbrenda
2020-07-03 11:51 ` [kvm-unit-tests PATCH v1 4/4] lib/vmalloc: allow vm_memalign with alignment > PAGE_SIZE Claudio Imbrenda
2020-07-03 12:30   ` Andrew Jones
2020-07-03 13:49     ` Claudio Imbrenda
2020-07-03 16:20       ` Paolo Bonzini [this message]
2020-07-03 12:30 ` [kvm-unit-tests PATCH v1 0/4] More lib/alloc cleanup and a minor improvement Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14ab47ea-0c26-f124-6757-56c465569bfd@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=david@redhat.com \
    --cc=drjones@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).