All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Julien Grall <julien.grall@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Campbell <ian.campbell@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH for 4.7] xen: Replace alloc_vcpu_guest_context() with vmalloc()
Date: Fri, 28 Aug 2015 14:07:08 +0100	[thread overview]
Message-ID: <55E05CFC.3080700@citrix.com> (raw)
In-Reply-To: <55E05AAD.7020608@citrix.com>

On 28/08/15 13:57, Julien Grall wrote:
> On 28/08/15 13:56, Andrew Cooper wrote:
>> On 28/08/15 13:41, Julien Grall wrote:
>>> Hi Andrew,
>>>
>>> On 21/08/15 18:51, Andrew Cooper wrote:
>>>> This essentially reverts c/s 2037f2adb "x86: introduce
>>>> alloc_vcpu_guest_context()", including the newer arm bits, but achieves
>>>> the same end goal by using the newer vmalloc() infrastructure.
>>> I would keep alloc_vcpu_guest_context and replace the content by
>>> vmalloc(...). It would avoid to open-coding the allocation on the vCPU
>>> on different places.
>> alloc_vcpu_guest_context() only existed because x86 used to need to do
>> something quite cumbersome.  This is no longer the case, given vmalloc()
>> as a more general solution.
>>
>> Retaining alloc_vcpu_guest_context() as just think wrapper, identical on
>> all architectures, is a bad idea as it call into a separate translation
>> unit which cannot be optimised.
> Unless if you introduce a static inline helper in the header. It would
> avoid open coding vmalloc and make easier future usage of it.

Hiding the type allocated makes the code harder to read, not easier.

We don't special case other plain allocations like this, so I still
don't see a compelling reason to break the norm here.

~Andrew

  reply	other threads:[~2015-08-28 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 17:51 [PATCH for 4.7] xen: Replace alloc_vcpu_guest_context() with vmalloc() Andrew Cooper
2015-08-21 17:55 ` Konrad Rzeszutek Wilk
2015-08-21 18:10   ` Andrew Cooper
2015-08-24 12:19     ` Jan Beulich
2015-08-24 12:19 ` Jan Beulich
2015-08-28 12:41 ` Julien Grall
2015-08-28 12:56   ` Andrew Cooper
2015-08-28 12:57     ` Julien Grall
2015-08-28 13:07       ` Andrew Cooper [this message]
2015-08-28 13:13         ` Julien Grall
2015-08-28 13:26           ` Jan Beulich

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=55E05CFC.3080700@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.