From: Richard Henderson <rth@twiddle.net>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] linux-user mmap bug
Date: Mon, 24 May 2010 08:45:31 -0700 [thread overview]
Message-ID: <4BFA9F1B.50301@twiddle.net> (raw)
In-Reply-To: <20100524145752.GA15283@edde.se.axis.com>
On 05/24/2010 07:57 AM, Edgar E. Iglesias wrote:
> I took a look at the code again and I dont really understand how the
> particular case when we get a high address from the kernel while
> mmap_min_addr is busy case is supposed to work :/
> In fact, for CRIS it never works on my host.
Indeed, there are many cases for which it doesn't work for the Alpha
target either.
> I changed it locally to keep scanning after a wrap until we succeed to
> allocate a chunk or rewrap (SLOW) but at least I can run dynamically
> linked CRIS programs again.
Yep. My hack had been similar, except that I used the PageDesc tree
to help speed things up. But PageDesc is hardly an ideal data structure
in which to search, since it quickly devolves into a linear search of
the address space.
Probably the easiest real fix is to re-read /proc/self/maps each time
the mmap_next_start guess fails and the kernel's returned address is
out of range.
Another is using the MMAP_32BIT flag on x86-64 host whenever a 31-bit
address is appropriate for the guest. E.g. mips32, where architecturally
the high half of the address space is reserved for kernel mode.
See
http://www.mail-archive.com/qemu-devel@nongnu.org/msg28924.html
for more ideas on the subject.
r~
next prev parent reply other threads:[~2010-05-24 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 13:28 [Qemu-devel] linux-user mmap bug Edgar E. Iglesias
2010-05-21 16:38 ` Richard Henderson
2010-05-21 17:39 ` Richard Henderson
2010-05-24 14:57 ` Edgar E. Iglesias
2010-05-24 15:45 ` Richard Henderson [this message]
2010-05-25 9:19 ` Edgar E. Iglesias
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=4BFA9F1B.50301@twiddle.net \
--to=rth@twiddle.net \
--cc=edgar.iglesias@gmail.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).