lkml.org 
[lkml]   [1998]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: gcc 2.7.1
On Wed, 5 Aug 1998, Linus Torvalds wrote:
> On Wed, 5 Aug 1998, Etienne Lorrain wrote:
> > Maybe it is time to upgrade to gcc-2.7.3, so that this patch could
> > be applied in the main stream :
>
> Do you have numbers for the effect of "-fno-strength-reduce"? Back when I
> added it I couldn't see any difference at all to any benchmarks, so I've
> had no real incentive to even try to remove it.
>
> Does anybody have any numbers that show that it actually matters for the
> kernel (I know it matters a lot for some other things, but I'm looking for
> something that really makes a difference in kernel-land)?

Hi,

I have done some benchmarking of the kernel (and not benchmarking
of gcc), and you are _again_ right...

Here is what I've done:

----------------------------
Measures concerning no-strength-reduce optimisation:

Basic script to test filesystem,processor,I/O - just after reboot,
nothing else running (shell /bin/bash) with linux-2.1.105-pre4
as kernel (cut and paste it with mouse/gpm), no X-window :
*** save your data before: directory /usr/src/linux ****
*** and file linux1.tar.gz ARE ERASED ****

cd /usr/src
rm -rf linux1.tar.gz linux result
cp linux-2.0.30.tar.gz linux1.tar.gz # not too big for my 386!

# REBOOT HERE

date > result ; \
cat /proc/version >> result ; \
cat /proc/meminfo >> result ; \
cat /proc/cpuinfo | grep bogomips >> result ; \
echo "gunzip linux1.tar.gz" >> result ; \
time --append -o result gunzip linux1.tar.gz ; \
echo "tar -xf linux1.tar" >> result ; \
time --append -o result tar -xf linux1.tar ; \
echo "rm -f linux1.tar" >> result ; \
time --append -o result rm -f linux1.tar ; \
echo "tar -czf linux1.tar.gz linux" >> result ; \
time --append -o result tar -czf linux1.tar.gz linux ; \
echo "parallel find :" >> result ; \
date >> result ; \
find linux -name "*.c" -exec grep "code" \{\} \; & \
find linux -name "*.h" -exec grep "define" \{\} \; & \
find linux -name "*.[ch]" -exec cat \{\} \; | wc & \
wait ; \
date >> result ; \
echo "rm -rf linux" >> result ; \
time --append -o result rm -rf linux ; \
date >> result


----------------------------
Without option -fno-strength-reduce (edited to fit):

Thu Aug 6 21:20:38 CEST 1998
Linux version 2.1.115 (root@xxxxxx.sony.de)
(gcc version 2.7.2.3) #1 Thu Aug 6 14:49:34 CEST 1998
total: used: free: shared: buffers: cached:
Mem: 15155200 7475200 7680000 7811072 757760 3055616
Swap: 50511872 0 50511872
MemTotal: 14800 kB
MemFree: 7500 kB
MemShared: 7628 kB
Buffers: 740 kB
Cached: 2984 kB
SwapTotal: 49328 kB
SwapFree: 49328 kB
bogomips : 6.27

gunzip linux1.tar.gz
88.39user 20.37system 2:02.31elapsed 88%CPU
(1604major+33minor)pagefaults 0swaps

tar -xf linux1.tar
21.15user 47.46system 1:33.48elapsed 73%CPU
(6289major+4350minor)pagefaults 0swaps

rm -f linux1.tar
0.07user 0.55system 0:04.18elapsed 14%CPU
(87major+13minor)pagefaults 0swaps

tar -czf linux1.tar.gz linux
598.07user 39.21system 10:44.11elapsed 98%CPU
(7150major+2295minor)pagefaults 0swaps

parallel find :
Thu Aug 6 21:35:05 CEST 1998
Thu Aug 6 21:44:03 CEST 1998

rm -rf linux
0.45user 4.55system 0:12.03elapsed 41%CPU
(91major+19minor)pagefaults 0swaps
Thu Aug 6 21:44:16 CEST 1998

* In short, start at 21:20:38, end at 21:44:16
* => total time 23'38''
* Another run: start at 22:21:02, end at 22:44:31
* => total time 23'29''
*
----------------------------
With option -fno-strength-reduce (edited):

Thu Aug 6 21:50:31 CEST 1998
Linux version 2.1.115 (root@xxxxxx.sony.de)
(gcc version 2.7.2.3) #1 Thu Aug 6 14:33:14 CEST 1998
total: used: free: shared: buffers: cached:
Mem: 15159296 7467008 7692288 7811072 757760 3055616
...
bogomips : 6.26

gunzip linux1.tar.gz
87.50user 22.03system 2:02.10elapsed 89%CPU
(1604major+33minor)pagefaults 0swaps

tar -xf linux1.tar
21.11user 48.33system 1:36.65elapsed 71%CPU
(6289major+4350minor)pagefaults 0swaps

rm -f linux1.tar
0.09user 0.43system 0:02.46elapsed 21%CPU
(87major+13minor)pagefaults 0swaps

tar -czf linux1.tar.gz linux
601.94user 39.40system 10:48.13elapsed 98%CPU
(7127major+2295minor)pagefaults 0swaps

parallel find :
Thu Aug 6 22:05:02 CEST 1998
Thu Aug 6 22:13:57 CEST 1998

rm -rf linux
0.44user 4.85system 0:13.13elapsed 40%CPU
(91major+19minor)pagefaults 0swaps
Thu Aug 6 22:14:11 CEST 1998

* In short, start at 21:50:31, end at 22:14:11
* => total time 23'40''
----------------------------

So, my benchmark is far to be perfect, but anyway
better than compilling the kernel, and the option
"-fno-strength-reduce" does not change anything
on gcc 2.7.3 .

Bye,
Etienne.

--
-- The world belong to its organizer.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.166 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site