Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2001 23:07:43 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Bruce Evans <bde@zeta.org.au>, Mikhail Teterin <mi@aldan.algebra.com>, jlemon@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: kernel size w/ optimized bzero() & patch set (was Re: Inline optimized bzero (was Re: cvs commit: src/sys/netinettcp_subr.c)) 
Message-ID:  <20010625060743.292F7380B@overcee.netplex.com.au>
In-Reply-To: <200106241702.f5OH2oN78720@earth.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Matt Dillon wrote:
>     Ok, how about this.  I replaced bzero() with the inline and placed it
>     in the machine-dependant section of code.  I managed to knock the inline
>     code generation down to the point where it does not bloat the resulting
>     kernel binary.  As an example of this, the 'register int z = 0' caused
>     all the assignments to 0 to use 'movl %eax,...' (3 byte instruction)
>     instead of 'movl $0,...' (7 byte instruction).  The kernel size is
>     around 6000 bytes larger without that optimization.  Sometimes GCC's
>     optimizer gets in the way :-(
> 
>     I am amazed by the results... and I found a couple of interesting things
>     out too.  For example, tcp_input bzero's a number of 8 and 12 byte
>     structures, not just the 20 byte structures we were looking at previously

Just think.. This new ``improved'' bzero code can now fill up all 4K of L1
instruction cache on most of my systems, and most of my 8K L1 instruction
cache on >= coppermine cpus.  I'm impressed.  Those microbenchmarks had
better be damn good, because it may end up the only thing that the system
will do well now since all this excessive inlining looks like it is blowing
the L1 cache out the door.

(I also apply the same complaint to the vm/* inlines).

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


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




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