qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Host vs Guest memory allocation
Date: Mon, 12 Apr 2010 07:48:45 -0700	[thread overview]
Message-ID: <4BC332CD.2060904@twiddle.net> (raw)
In-Reply-To: <201004121225.18070.paul@codesourcery.com>

On 04/12/2010 04:25 AM, Paul Brook wrote:
>> (1) Enable softmmu for userland. This is of course the highest overhead,
>>      but will work for all combinations.
>
> This has a significant performance hit, and gets very tricky for things like
> mmaped files.

It has the advantage of actually working for several cases of 64-on-32
that simply don't at the moment.  MMap is tricky, but no more than 
usual.  We still have problems with partial pages mapped past the end
of the file when host page size > target page size.

>> (2) Pre-allocate the entire guest address space in the host.  With
>>      Linux mmap w/ MAP_NORESERVE or Windows VirtualAlloc w/ MEM_RESERVE
>>      and a possibly reduced guest address space this is doesn't seem so bad.
>
> This breaks if the host sets ulimit -v.

Yes, but we'd know that immediately at startup.  This is why I 
recommended implementing multiple solutions and falling back from one to 
the other when we find they don't work.


r~

      reply	other threads:[~2010-04-12 14:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 22:45 [Qemu-devel] [RFC] Host vs Guest memory allocation Richard Henderson
2010-04-05 23:18 ` Aurelien Jarno
2010-04-12 11:48   ` Avi Kivity
2010-04-12 14:55     ` Richard Henderson
2010-04-12 15:09       ` Avi Kivity
2010-04-12 15:39         ` Alexander Graf
2010-04-12 15:49           ` Avi Kivity
2010-04-12 15:56             ` Alexander Graf
2010-04-12 16:08               ` Avi Kivity
2010-04-12 11:25 ` Paul Brook
2010-04-12 14:48   ` Richard Henderson [this message]

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=4BC332CD.2060904@twiddle.net \
    --to=rth@twiddle.net \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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 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).