Subject: Re: newlock2 and binary compatibility
To: Martijn van Buul <pino+gmane_os_netbsd_current@dohd.org>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 03/02/2007 11:32:19
--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 02, 2007 at 08:47:43AM +0000, Martijn van Buul wrote:
[...]
> Is a "true" solution actually possible? I don't know the old scheduler

It'd be very hard.

> activation syscall interface nor the newlock2 one well enough to figure o=
ut
> if emulation would be feasible, but it would be nice of something could
> be done.

Sure, it'd be nice.  Breaking binary compatibility is not a pleasant
thing to do, especially when you consider the history NetBSD has in that
respect, but it's an effort nobody could afford so far, because SA is
very complex and the implementation relied on behaviours of the kernel
that the newlock2 branch's point was precisely to get rid of.

Anyone is welcome to have a try at that, though, it'd make a lot of
people happy, but it is _not_ a simple task.

> [1] Yes, I am aware that I'm probably stressing the compat32 stuff too=20
>     much, but it's worth the effort. So far, it works surprisingly well,
>     after I removed /etc/ld.so.conf in the chroot.

Actually, you don't want to do that, because it means you never use the
FPU.  The way sysctl emulation is done prevents COMPAT_NETBSD32 from
exposing a node the native tree doesn't have, so you don't get
machdep.fpu_present.  One solution could be to define it on amd64 (and
of course wire it to 1), but I don't really like that.

Anyway, you should just change ld.so.conf so that the sysctl that is
being tested is something the netbsd32 tree exposes, like
kern.job_control.

COMPAT_NETBSD32 should just work to compile packages.  The problems
are mount(2) and device major numbers, both of which don't show up in
pkgsrc builds.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--hHWLQfXTYDoKhP50
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRef9M9goQloHrPnoAQIxeQf/fHa9dSb6W8BKNQkuAKX2AteGU+vOCaim
yKg95KtLCzLcNKd6h9JIWrtxDm0hMfLaj5cdlNWb5JiVT2LTsCO58iGqtgfLUpkS
xxmaT9P3hyZtUKfIUp1DX2Uq/bAXZZUnyxKWrHwTtDMSy6xowFWO7TOU2qMFzX4D
LeAY45bHXeF7ihy5DraEZ19kARzja2tKiG7pKUmT6UQ1suuf8b3DXgakpZLJVQJw
te2M9EDzY4uMOQ2gS+4tEg5Rh7K/Pf4fJAMO55fRmwchRYLldW2jK/YsEEFCsEkq
ddeAtunzeIsj3TnciDJPhhBET0mrYl2amn7ZWVyuMPdWQukwlkg6sw==
=5aNU
-----END PGP SIGNATURE-----

--hHWLQfXTYDoKhP50--