Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 05:23:30 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Jake Burkholder <jake@k7.locore.ca>, John Baldwin <jhb@FreeBSD.ORG>, <freebsd-smp@FreeBSD.ORG>, <freebsd-alpha@FreeBSD.ORG>
Subject:   Re: Preliminary proposed rollup of kernel submap initialization code
Message-ID:  <20010823051540.U15063-100000@besplex.bde.org>
In-Reply-To: <200108221456.f7MEufD74609@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Aug 2001, Matt Dillon wrote:

> :Then you pass it's address in...
> :
> :> +void
> :> +vm_ksubmap_init(struct kva_md_info *kmi)
> :> +{
> :
> :And then use much more expensive pointer arithmatic...
> :
> :> +       buffer_map = kmem_suballoc(clean_map, &kmi->buffer_sva,
> :> +                       &kmi->buffer_eva, (nbuf*BKVASIZE));
> :
> :I understand that this is called once, but doesn't this
> :really obfuscate things?
> :
> :-- Terry
>
>     I don't follow.  The argument passing and pointer arithmatic is not
>     expensive at all - in fact, it is less expensive then the original MD
>     code if you look at the assembly output!  And who really gives a damn
>     about a few nanoseconds during boot anyway?
>
>     kmi is static in the MD sections because it allows the kernel to compile
             global
>     for all platforms without us having to 'fix' all platforms all at once.

Make it global in an MI section and it automatically implements it in all
platforms at once (platforms that haven't been "fixed" simply don't use it).

>     One could also argue that the mainline kernel code has no direct need to
>     know about the contents of kmi but that wasn't the main reason for doing
>     it that way.

I prefer keeping the variables separate like they used to be.  There is
even less need for them to be combined in a struct than there used to be,
since centralizing the their initializations ensures that they are the same
for all arches.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010823051540.U15063-100000>