All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] xen: Avoid useless allocation in Xen case.
Date: Mon, 01 Aug 2011 21:57:34 +0200	[thread overview]
Message-ID: <4E37052E.70707@web.de> (raw)
In-Reply-To: <1312226782-26882-1-git-send-email-anthony.perard@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

On 2011-08-01 21:26, Anthony PERARD wrote:
> The code_gen_buffer is not use by Xen and can be really big (several
> GB). Even if the host RAM is not used, this buffer just burn the address
> space of the QEMU process.
> 
> So to "avoid" this allocation, the asked tb_size is set to the minimum.
> 
> The other way to do that would be to not call code_gen_alloc when Xen is
> enabled.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  vl.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index d8c7c01..bd60a89 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3106,6 +3106,14 @@ int main(int argc, char **argv, char **envp)
>          }
>      }
>  
> +    if (xen_enabled()) {
> +        /* Allocate only the minimum amount of memory for the code_gen_buffer.
> +         * Xen does not use it and we need the virtual address space for the
> +         * MapCache.
> +         */
> +        tb_size = 1;
> +    }
> +

The same applies to kvm, please generalize.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH] xen: Avoid useless allocation in Xen case.
Date: Mon, 01 Aug 2011 21:57:34 +0200	[thread overview]
Message-ID: <4E37052E.70707@web.de> (raw)
In-Reply-To: <1312226782-26882-1-git-send-email-anthony.perard@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

On 2011-08-01 21:26, Anthony PERARD wrote:
> The code_gen_buffer is not use by Xen and can be really big (several
> GB). Even if the host RAM is not used, this buffer just burn the address
> space of the QEMU process.
> 
> So to "avoid" this allocation, the asked tb_size is set to the minimum.
> 
> The other way to do that would be to not call code_gen_alloc when Xen is
> enabled.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  vl.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index d8c7c01..bd60a89 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3106,6 +3106,14 @@ int main(int argc, char **argv, char **envp)
>          }
>      }
>  
> +    if (xen_enabled()) {
> +        /* Allocate only the minimum amount of memory for the code_gen_buffer.
> +         * Xen does not use it and we need the virtual address space for the
> +         * MapCache.
> +         */
> +        tb_size = 1;
> +    }
> +

The same applies to kvm, please generalize.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-08-01 19:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 19:26 [Qemu-devel] [PATCH] xen: Avoid useless allocation in Xen case Anthony PERARD
2011-08-01 19:26 ` Anthony PERARD
2011-08-01 19:57 ` Jan Kiszka [this message]
2011-08-01 19:57   ` Jan Kiszka
2011-08-02 10:49   ` [Qemu-devel] " Jan Kiszka
2011-08-02 10:49     ` Jan Kiszka
2011-08-02 12:13     ` [Qemu-devel] " Anthony PERARD
2011-08-02 12:13       ` Anthony PERARD
2011-08-02 12:49       ` [Qemu-devel] " Jan Kiszka
2011-08-02 12:49         ` Jan Kiszka

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=4E37052E.70707@web.de \
    --to=jan.kiszka@web.de \
    --cc=agraf@suse.de \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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 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.