Subject: Re: LKMs (was Re: IPSEC in GENERIC)
To: Andrew Reilly <andrew-netbsd@areilly.bpc-users.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/22/2006 09:02:48
--Kj7319i9nmIyA2yE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 22, 2006 at 05:26:53PM +1100, Andrew Reilly wrote:
> On Tue, Feb 21, 2006 at 09:48:21AM +1100, Simon Burge wrote:
> > MIPS needs to use -mlong-calls to compile LKMs, and PowerPC and ARM use
> > trampolines to call functions external to the LKM, so there's at least
> > some performance hit for those architectures.
>=20
> Isn't that what happens to all of the "far" calls in the kernel on
> those processors anyway?  Sure, you might find that some of the
> kernel API functions wind up linked close enough to be optimised to
> short branches, but kernels are pretty large animals these days,
> compared to the range of branches in most RISC architectures, so I
> wouldn't want to bet on it being a really big performance hit.

Actually no. At least for PPC. PPC has a +/- 32 MB (I think it's 32, might=
=20
be 16) relative jump. For a monolithic kernel, that covers all but the=20
hugest kernels. However LKMs get loaded into another segment and thus are=
=20
over 256 MB away by definition.

Take care,

Bill

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

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

iD8DBQFD/Jk4Wz+3JHUci9cRArJTAJ9Wjx8XxKDTELzqxta4tr13gbH1rQCgjYSs
tE1thd2+sd1QTpmh4l+T0fg=
=ciQm
-----END PGP SIGNATURE-----

--Kj7319i9nmIyA2yE--