Re: Mixing amd64 kernel with i386 world

2013-09-29 Thread Adrian Chadd
+1.


On 28 September 2013 06:56, Ian Lepore  wrote:

> On Sat, 2013-09-28 at 20:37 +1000, Peter Jeremy wrote:
> > I have a system with 4GB RAM and hence need to use an amd64 kernel to use
> > all the RAM (I can only access 3GB RAM with an i386 kernel).  OTOH, amd64
> > processes are significantly (50-100%) larger than equivalent i386
> processes
> > and none none of the applications I'll be running on the system need to
> be
> > 64-bit.
> >
> > 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.
> >
> > Has anyone investigated this approach?
> >
>
> Why are you ignoring PAE?  It's been working for me for years.
>

Yeah, if there's PAE issues in -HEAD (read: there are, and we should fix
the bugs that alfred/andre's autotuning stuff introduced) then we should
fix it.

PAE should still be working!



-adrian
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"


Re: Mixing amd64 kernel with i386 world

2013-09-28 Thread Nathan Whitehorn



On Sat, 28 Sep 2013, Peter Jeremy wrote:


I have a system with 4GB RAM and hence need to use an amd64 kernel to use
all the RAM (I can only access 3GB RAM with an i386 kernel).  OTOH, amd64
processes are significantly (50-100%) larger than equivalent i386 processes
and none none of the applications I'll be running on the system need to be
64-bit.

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.



For whatever it is worth, I have done this running a ppc32 userland with a 
ppc64 kernel (that is how ppc64 was first developed actually, before the 
64-bit userland existed) and it worked just fine.

-Nathan
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"


Re: Mixing amd64 kernel with i386 world

2013-09-28 Thread Konstantin Belousov
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 use
> > all the RAM (I can only access 3GB RAM with an i386 kernel).  OTOH, amd64
> > processes are significantly (50-100%) larger than equivalent i386 processes
> > and none none of the applications I'll be running on the system need to be
> > 64-bit.
> > 
> > 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.
> > 
> > Has anyone investigated this approach?
> 
> 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 proposition.


pgpAZZ52Y_U8w.pgp
Description: PGP signature


Re: Mixing amd64 kernel with i386 world

2013-09-28 Thread Ian Lepore
On Sat, 2013-09-28 at 20:37 +1000, Peter Jeremy wrote:
> I have a system with 4GB RAM and hence need to use an amd64 kernel to use
> all the RAM (I can only access 3GB RAM with an i386 kernel).  OTOH, amd64
> processes are significantly (50-100%) larger than equivalent i386 processes
> and none none of the applications I'll be running on the system need to be
> 64-bit.
> 
> 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.
> 
> Has anyone investigated this approach?
> 

Why are you ignoring PAE?  It's been working for me for years.

-- Ian


___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"


Re: Mixing amd64 kernel with i386 world

2013-09-28 Thread Dimitry Andric
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 use
> all the RAM (I can only access 3GB RAM with an i386 kernel).  OTOH, amd64
> processes are significantly (50-100%) larger than equivalent i386 processes
> and none none of the applications I'll be running on the system need to be
> 64-bit.
> 
> 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.
> 
> Has anyone investigated this approach?

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... :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail