From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: Align mmap memory to the target page size.
Date: Fri, 15 Jan 2010 07:43:48 -0800 [thread overview]
Message-ID: <4B508D34.70304@twiddle.net> (raw)
In-Reply-To: <20100115011604.DCB1CB93@are.twiddle.net>
On 01/14/2010 04:38 PM, Richard Henderson wrote:
> Previously, mmap_find_vma could return addresses not properly aligned
> to the target page size. This of course led to all sorts of odd
> problems down the road.
>
> The trivial fix, to simply reject the unaligned address and continue
> searching the address space by increments of one page, is not a good
> idea when there's a 64-bit address space involved. The kernel may well
> continue to return the last available address which we've already
> rejected while we search upward from e.g. 2**42 from 2**64.
>
> This patch uses a more complex search algorithm that takes the result
> of the previous allocation into account. We normally search upward,
> but notice 2 consecutive results and start searching downward instead.
I've failed to take guest_base into account properly; my testing
happened to have guest_base = 0. New patch to follow.
r~
next prev parent reply other threads:[~2010-01-15 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 0:38 [Qemu-devel] [PATCH] linux-user: Align mmap memory to the target page size Richard Henderson
2010-01-15 15:43 ` Richard Henderson [this message]
2010-01-25 13:35 ` Riku Voipio
2010-01-25 16:38 ` Richard Henderson
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=4B508D34.70304@twiddle.net \
--to=rth@twiddle.net \
--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).