From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 28 14:27:29 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6DD6DD39; Sat, 28 Sep 2013 14:27:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05E3A2EDB; Sat, 28 Sep 2013 14:27:28 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8SERIoj012711; Sat, 28 Sep 2013 17:27:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8SERIoj012711 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8SERGuf012710; Sat, 28 Sep 2013 17:27:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Sep 2013 17:27:16 +0300 From: Konstantin Belousov To: Dimitry Andric Subject: Re: Mixing amd64 kernel with i386 world Message-ID: <20130928142716.GN41229@kib.kiev.ua> References: <20130928103758.GC27231@server.rulingia.com> <30CAFBF9-4119-4E3D-A5B0-4520E35F1601@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CE8aATqwJvGw1INf" Content-Disposition: inline In-Reply-To: <30CAFBF9-4119-4E3D-A5B0-4520E35F1601@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 14:27:29 -0000 --CE8aATqwJvGw1INf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 28, 2013 at 01:25:39PM +0200, Dimitry Andric wrote: > On Sep 28, 2013, at 12:37, Peter Jeremy wrote: > > I have a system with 4GB RAM and hence need to use an amd64 kernel to u= se > > all the RAM (I can only access 3GB RAM with an i386 kernel). OTOH, amd= 64 > > processes are significantly (50-100%) larger than equivalent i386 proce= sses > > and none none of the applications I'll be running on the system need to= be > > 64-bit. > >=20 > > This implies that the optimal approach is an amd64 kernel with i386 > > userland (I'm ignoring PAE as a useable approach). I've successfully > > run i386 jails on amd64 systems so I know this mostly works. I also > > know that there are some gotchas: > > - kdump needs to match the kernel > > - anything accessing /dev/mem or /dev/kmem (which implies anything that > > uses libkvm) probably needs to match the kernel. > >=20 > > Has anyone investigated this approach? >=20 > I have only run i386 jails on amd64, just like you. Though for the use > case you are describing, the really optimal approach would be to have > real x32 support. Unfortunately, that is quite a lot of work... :) The management interfaces usually do not work for compat32 on amd64. The biggest exception I am aware of is nmount(2). But you would be without network. The same is true for almost all sysctls, again kern.proc.* hierarchy is an exception and works. Syscalls required to normal usermode operation do work, at least most developers care about this, except for capsicum. Using 32bit jail or, even easier, chroot, for now, is the easiest propositi= on. --CE8aATqwJvGw1INf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSRudDAAoJEJDCuSvBvK1BOcoP/RlOkjVFE2AYrUzQ1MLb61fi 7zi/xV/Ay+wmuG5M+xxXUUvCrc/EbHM5SayHCOBR87rKlzJah2wgOobfp3/4yDEz dk9wuEbVP9Ic0c1DPLWp3xSCnstiLogwCJb0ggHHLpEJgExb1Xq8b9C1Laga+aEu QTRhFfKQcVxdk2zYN3LNeaoGHfn52Bwjwqemgz69SZkmieUb/EkD+VZxclK7SUwa whyag0fYMoypFFT9/2TJBUcLGspYQ4d5HltyKPrH0MeZEdEDGkY9iNXz2duDC6kn iohxuxg3ixLI/h6NqdPwV1j6DL33M6PdvaqJ81y9JlQQdqKygA9O5kWGgDtucslr cyc/UAXmmp88XtFD3N4Q/jgqF8Qpx7NEHYFIJByhoAwtJ7pKUVRXtTgdqS8myWrz Y60tM8byQZcBsxKOYBtA3VKqW61K+GZnrFycw7ZyIO6WxKWKs6xH+2+HeMYmooGB XtZJLTsAAM+OOm2GqM+7T/UDWJkAAw12R9TEI1Es7VB899ldCijQ9tPG85G7mi0O qaePYUorGU2Pfg1fXrovmap7DechsYejqIhEfM+5O1kCQRW6sSAYNlL8hOWkWp+r pRChyLPpFjFepO87+rHfS1QASEYK4pJvafxzcv7MHolL2d74sLC06JIhWtwAYNei nq4gjNKgq/ZEAx6bb3QV =3fys -----END PGP SIGNATURE----- --CE8aATqwJvGw1INf--