Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2015 12:12:10 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, alc@rice.edu, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@FreeBSD.org
Subject:   Re: svn commit: r280327 - in head/sys: kern vm
Message-ID:  <20150330091209.GC2379@kib.kiev.ua>
In-Reply-To: <201503300625.t2U6PE3c093114@gw.catspoiler.org>
References:  <5516EB31.7000309@rice.edu> <201503300625.t2U6PE3c093114@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 29, 2015 at 11:25:14PM -0700, Don Lewis wrote:
> On amd64, with an amd64 jail, and kernel rev r280326, I observe the
> following:
> 	One gcc process calls mmap() with addr=0 and len=0x657a000, and
>         the value 0x811400000 is returned.  Subsequent gcc processes
>         call mmap() with addr=0x811400000 and len=0x657a000, getting
>         0x811400000 in return.
> 
> With kernel rev r280327 I see:
> 	One gcc process calls mmap() with addr=0 and len=0x657a000, and
> 	the value 0x811400000 is returned.  Subsequent gcc processes
> 	call mmap() with addr=0x811400000 and len=0x657a000, getting
> 	0x8115f4000 in return.  What I later noticed is that the subsequent
> 	calls are passing offset=0x1f4000.  Not so coincidentally,
> 	0x811400000 + 0x1f4000 = 0x8115F4000.
> 
> My first attempt at a fix subtracted offset from address, but the mmap()
> return value changed to 0x8113f4000 instead of the 0x811400000 I was
> expecting.  It looked to me like the code must be doing superpage
> alignment on the start of the file and then adding the offset to get the
> start of the mapped region.
So the real fix is to make gcc pass MAP_FIXED.

> 
> This somewhat hacking patch disables this alignment if a non-zero
> address is passed as a hint, and allows the code to make the start of
> the mapped region match the hint.  With this patch, I've been able to
> build openjdk7 in a FreeBSD 9.3 amd64 jail.
> 
This is for precompiled headers, right ?  Could port disable pch ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150330091209.GC2379>