lazy_init
also: lazy initialization, deferred initialization
A kernel optimization technique that defers the initialization of a subsystem or resource until it is actually needed, rather than initializing it during system boot.
lazy_init is a performance optimization strategy where the Linux kernel postpones expensive initialization tasks until they are first required. This reduces boot time and memory usage by avoiding unnecessary setup for features or hardware that may never be used.
Common examples include lazy initialization of CPU features (detected and enabled only when first accessed), filesystem journal recovery (deferred until the filesystem is mounted), and device driver initialization (loaded only when the hardware is detected or explicitly requested).
For instance, CPU features like AVX or other instruction set extensions may be initialized lazily to avoid overhead on systems that don't need them, or their initialization is deferred until a process actually attempts to use those instructions.
This approach trades slightly higher latency on first use for significant improvements in boot speed and system responsiveness at startup.