kernel cpu entries (was: Odd performance problems after upgrade from 4.11 to 6.0-Stable)



Kevin Oberman wrote:
Scott Long wrote:
Also, taking out CPU_I586 is usually a bad idea. It offers no performance penalties (unlike CPU_I386 and maybe CPU_I486), but
enables things like optimized bcopy.

Ahh, This is the sort of thing I never realized. Is there anything in the handbook that covers this? I had always been under the impression that CPU_I686 enabled all things that the 686 was capable of. I will build a new kernel to add that back in.

From tuning(7):
**************************************************
There are a number of *_CPU options that can be commented out. If you only want the kernel to run on a Pentium class CPU, you can easily remove I486_CPU, but only remove I586_CPU if you are sure your CPU is being recognized as a Pentium II or better. Some clones may be recognized as a Pentium or even a 486 and not be able to boot without those options. If it works, great! The operating system will be able to better use higher-end CPU features for MMU, task switching, timebase, and even device operations...
**************************************************


From /sys/i386/conf/NOTES:
**************************************************
# You must specify at least one CPU (the one you intend to run on);
# deleting the specification for CPUs you don't need to use may make
# parts of the system run faster.
**************************************************

From npx(4) (also see /sys/i386/i386/support.s):
**************************************************
The NPX registers are normally used to optimize copying and zeroing when all of the following conditions are satisfied:
1. cpu I586_CPU is an option
...
Then copying and zeroing using the NPX registers is normally 30-100% faster.
**************************************************


All is rosy until you see that I586_CPU looks like a loss for blowfish (if you have an i686 CPU):
/sys/crypto/blowfish/arch/i386/bf_enc.S


As I use AES, I guess I586_CPU is a win for me. Despite this, I think it makes the most sense for I686_CPU to enable the optimized bcopy if it really is a win for i686 CPUs.

-Jonathan
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PATCH] AMD Thermal Interrupt Support
    ... This patch to 2.6.24-rc5 enables AMD Barcelona CPUs to register thermal throttling events as machine checks, ... * Wrapper for the CPU-specific thermal interrupt service routine. ... we'd have to discern the CPU brand at runtime (because support could ...
    (Linux-Kernel)
  • Re: kernel cpu entries
    ... enables things like optimized bcopy. ... There are a number of *_CPU options that can be commented out. ... it makes the most sense for I686_CPU to enable the optimized bcopy if it ... SSE instead, and that any change that doesn't involve SSE is wrong and ...
    (freebsd-stable)
  • Re: [BUG] x86 kenel wont boot under Virtual PC
    ... optimizations have historically really been about _optimizing_, ... those exceptions have been way more imporant than NOPL). ... actually enables EMBEDDED and does all his choices by hand should no ... The difference between a kernel compiled for generic and once compiled for a specific CPU can be very significant. ...
    (Linux-Kernel)
  • Re: kernel cpu entries
    ... enables things like optimized bcopy. ... If you only want the kernel to run on a Pentium class CPU, you can easily remove I486_CPU, but only remove I586_CPU if you are sure your CPU is being recognized as a Pentium II or better. ... I think it makes the most sense for I686_CPU to enable the optimized bcopy if it really is a win for i686 CPUs. ... SSE instead, and that any change that doesn't involve SSE is wrong and ...
    (freebsd-stable)
  • Re: kernel cpu entries
    ... >>> enables things like optimized bcopy. ... > There are a number of *_CPU options that can be commented out. ... > being recognized as a Pentium II or better. ... > # You must specify at least one CPU; ...
    (freebsd-stable)