From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:12:27 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59E97520; Mon, 30 Mar 2015 09:12:27 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC2FEC8; Mon, 30 Mar 2015 09:12:26 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2U9CAOO056132 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 30 Mar 2015 12:12:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2U9CAOO056132 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2U9CAT5056131; Mon, 30 Mar 2015 12:12:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Mar 2015 12:12:10 +0300 From: Konstantin Belousov To: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm Message-ID: <20150330091209.GC2379@kib.kiev.ua> References: <5516EB31.7000309@rice.edu> <201503300625.t2U6PE3c093114@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503300625.t2U6PE3c093114@gw.catspoiler.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 09:12:27 -0000 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 ?