From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] fix mmap 0.9.1 mmap regression in linux-user
Date: Thu, 17 Jan 2008 13:35:07 -0500 (EST) [thread overview]
Message-ID: <20080117133009.P82491-100000@bell.csl.cornell.edu> (raw)
Hello
The 0.9.1 release segfaults on certain benchmarks under linux-user
emulation (x86 on x86).
Specifically "facerec" from the SPEC2000 benchmarks, and over half of the
SPEC2006 benchmarks.
I tracked this down to a problem in the mmap() code in linux-user.
I've attached a patch that reverts behavior back to that from 0.9.0, which
makes the benchmarks all run for me.
The problem is that after a large number of mmap() calls, the
mmap_find_vma() fuction sometimes completely destroys the memory map
table. I can produce debug info on this if needed. What the patch does
is make the code ignore the results of mmap_find_vma().
I'm not familiar enough with the qemu mmap() code to fix this properly...
Thanks
Vince
--- ./qemu-0.9.1-stock/linux-user/mmap.c 2008-01-06 14:38:42.000000000 -0500
+++ ./qemu-0.9.1/linux-user/mmap.c 2008-01-17 13:27:11.000000000 -0500
@@ -250,8 +250,8 @@
/* Note: we prefer to control the mapping address. It is
especially important if qemu_host_page_size >
qemu_real_host_page_size */
- p = mmap(g2h(mmap_start),
- host_len, prot, flags | MAP_FIXED, fd, host_offset);
+ p = mmap(real_start ? g2h(real_start) : NULL,
+ host_len, prot, flags, fd, host_offset);
if (p == MAP_FAILED)
return -1;
/* update start so that it points to the file position at 'offset' */
next reply other threads:[~2008-01-17 18:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 18:35 Vince Weaver [this message]
2008-01-18 2:34 ` [Qemu-devel] [patch] fix mmap 0.9.1 mmap regression in linux-user Mulyadi Santosa
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=20080117133009.P82491-100000@bell.csl.cornell.edu \
--to=vince@csl.cornell.edu \
--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).