• [^] # Re: et...

    Posté par . En réponse au journal Linux 2.6.17 is out !. Évalué à 10.

    le truc le plus impressionant pour moi:

    Yet another mechanism is the "alternatives" feature, which allows the kernel to optimize itself at boot time. Consider this example of alternatives use (from include/asm-i386/system.h):

    #define mb() alternative("lock; addl 0,0ドル(%%esp)", \
    "mfence", \
    X86_FEATURE_XMM2)

    The alternative() macro compiles in the default code, but also makes a note of its location (and alternative implementation) in a special ELF section. Early in the boot process, the kernel calls apply_alternatives(), which makes a pass through that special section. Every alternative instruction which is supported by the running processor is patched directly into the loaded kernel image; it will be filled with no-op instructions if need be. Once apply_alternatives() has finished its work, the kernel behaves as if it had been compiled for the processor it is actually running on. This mechanism allows distributors to ship generic kernels which can optimize themselves at boot time.

    un kernel générique que les distributions distribueront, qui s'optimise au boot pour l'architecture présente (un vieux 486 ou le dernier P4 SMP de-la-mort-qui-tue)