Re: Release Building and /etc/make.conf

From: Erik Trulsson (ertr1013_at_student.uu.se)
Date: 01/20/04

  • Next message: David O'Brien: "Re: compiling world with optimization"
    Date: Tue, 20 Jan 2004 16:30:37 +0100
    To: Bruce Evans <bde@zeta.org.au>
    
    

    On Wed, Jan 21, 2004 at 01:41:26AM +1100, Bruce Evans wrote:
    >
    > bsd.cpu.mk should rarely be edited, but /etc.make.conf is per-machine so
    > you can put anything you want in it. However, defaulting to
    > -mcpu=pentiumpro is just a bug, so I edit it out of bsd.cpu.mk. It
    > just micro-pessimizes for all CPUs that aren't pentium pros. This is
    > almost harmless for i386's because no one uses them, and almost harmless
    > for P3's and maybe P4's because they share some bottlenecks with pentiumpros,
    > but Athlons handle naive i386 code better than pentiums so many of the
    > pentiumpro optimizations are pessimizations for athlons.

    Considering that the PentiumII and PentiumIII are based on the same
    microarchitecture as the Pentium Pro, optimizing for the Pentium Pro,
    should give fairly good performance on a large number of CPUs.
    Optimizing for any given CPU will pessimize for some other CPUs, and
    today it is probably better to optimize for the P6 architecture than to
    optimize for a '486 which is what gcc at least used to do as default.

    >
    > Note that CPUTYPE has worse bugs for i386's. Setting it to a supported
    > CPU gives -march instead of -mcpu, so using it gives unportable binaries,
    > and bsd.cpu.mk provides no way to get the corresponding -mcpu settings.
    > OTOH, CPUTYPE for alphas gives only -mcpu.

    Note that the meaning of -mcpu is different for x86 and Alpha.
    -mcpu on alpha is equivalent to -march for x86, in that it allows new
    instructions to be used. -mtune is the option you need to use for
    alpha to get the same behaviour as -mcpu gives for x86 (i.e. optimize
    for a certain CPU, but make sure the code still runs on older CPUs.)

    The GCC people seem to have never quite managed to make up their minds
    on what the options for this should be named. Sparc and PowerPC also
    uses -mcpu/-mtune while MIPS uses -march/-mtune, HPPA uses
    -march/-mscheduling and M68k doesn't really have any equivalent of
    -mtune. All in all a complete mess which doesn't seem likely to be
    fixed any time soon.

    >
    > Some times for an integer crunching application (searching a game tree)
    > compiled with various options and running on an Athlon-XP:
    >
    > -O3 -fomit-frame-pointer -mcpu=i586: 11.21 seconds
    > -O3 -fomit-frame-pointer -mcpu=athlon-xp: 11.23
    > -O3 -fomit-frame-pointer -mcpu=i386: 11.93 (-mcpu=i386 is the default)
    > -O3 -fomit-frame-pointer -mcpu=i486 12.72
    > -O3 -fomit-frame-pointer -mcpu=pentium3: 14.71
    > -O3 -fomit-frame-pointer -mcpu=pentium-pro 14.72
    > -O3 -fomit-frame-pointer -mcpu=pentium2: 14.72
    > -O3 -fomit-frame-pointer -mcpu=pentium4: 18.19
    >
    > I think my normal application (cc) is not affected by -mcpu nearly as much
    > as this, and don't use -mcpu for building worlds. The above shows that
    > -mcpu=i386 is not too bad for athlons (but this might change for FP
    > crunching applications).

    But -mcpu=i586 seems to give results on that particular test, and seems
    likely to give better performance than -mcpu=i386 in general when used on
    other benchmarks and CPUs.

    -- 
    <Insert your favourite quote here.>
    Erik Trulsson
    ertr1013@student.uu.se
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: David O'Brien: "Re: compiling world with optimization"

    Relevant Pages

    • Re: CPU info
      ... >> a marketing strategy to separate the new generation of AMD's CPUs from ... >> Intel CPUs are traditionally more expensive than AMD's, ... I'll probably either keep the old guy around and install Elive ... install of 7.0 and KDE on a 166MHz Pentium system with 64 MB of RAM into ...
      (comp.os.linux.hardware)
    • Re: GX100 CPU Upgrade: Which CPU?
      ... The GX100 motherboard has limited support for Pentium III CPUs. ...
      (alt.sys.pc-clone.dell)
    • Re: Help:Upgrading 7955 CPU(1.5Ghz to 2.2Ghz)
      ... CPU World contains a complete list of sSpec numbers for Pentium 4s. ... Celeron CPUs have their naysayers ...
      (comp.sys.hp.hardware)
    • Re: Help:Upgrading 7955 CPU(1.5Ghz to 2.2Ghz)
      ... CPU World contains a complete list of sSpec numbers for Pentium 4s. ... Celeron CPUs have their naysayers ...
      (comp.sys.hp.hardware)
    • Re: 14.104a Kernel Question
      ... 486, Pentium, and Pentium Pro. ... *This build is safe for Pentium Pros. ... W4 kernel in this context means 14.104_W4 kernel. ... 14.104_UNI or 14.104_SMP kernel with 486SX CPUs. ...
      (comp.os.os2.setup.misc)