Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
Subject: bad alignment for ncompress-4.2.4-6.axp.rpm
Date: Fri, 25 Oct 1996 22:55:08 +0200 (MET DST)	[thread overview]
Message-ID: <m0vGtHZ-0001jGC@ceres.tat.physik.uni-tuebingen.de> (raw)

bsd compress in ncompress-4.2.4-6.axp.rpm is compiled with wrong options
and generates an unaligned access trap for *every* byte which is output!
one possible fix without changing the Makefile would be

-------------------------------------------------------------------------------
--- SPECS/ncompress-4.2.4.spec~	Wed Aug 14 17:44:23 1996
+++ SPECS/ncompress-4.2.4.spec	Fri Oct 25 22:39:09 1996
@@ -28,7 +28,7 @@
 %endif
 
 %ifarch axp
-make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS -DNO_ALLIGN=0" ENDIAN=4321
+make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS" ENDIAN=4321 'options= -DDIRENT=1 -DSYSDIR=1 -DUTIME_H=1 -DUSERMEM=800000 -DREGISTERS=20 -DIBUFSIZ=1024 -DOBUFSIZ=1024 -DBYTEORDER=$(ENDIAN) -DNOALLIGN=0'
 %endif
 
 %install
-------------------------------------------------------------------------------

but maybe it's better to patch the makefile to get this right ?
note that you've misspelled NOALLIGN (is NO_ALLIGN in your spec file)
but fixing the typo doesn't work, it's overridden by the "options" varaible...

example of the performace impact on this (XL266, Linux-2.0.22)
compressing the X server (original size 5164194) :

	# cat /usr/bin/X11/X | time compress.fixed  | wc
	3.35user 0.19system 0:04.19elapsed 84%CPU
	  15003   79006 2547805

	# grep user /proc/cpuinfo 
	user unaligned acc      : 2770836 (pc=120003b4c,va=120246717)

	# cat /usr/bin/X11/X | time compress.broken  | wc
	4.54user 6.97system 0:12.05elapsed 95%CPU
	  15003   79006 2547805

	# grep user /proc/cpuinfo 
	user unaligned acc      : 5314468 (pc=120003b4c,va=120246717)

so 2.5M traps took ~1 user and ~7 system cpu secs  
giving ~320k traps per cpu-sec 

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

                 reply	other threads:[~1996-10-25 20:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox