]> Git Repo - linux.git/commitdiff
Merge tag 'wq-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
authorLinus Torvalds <[email protected]>
Mon, 11 Mar 2024 19:50:42 +0000 (12:50 -0700)
committerLinus Torvalds <[email protected]>
Mon, 11 Mar 2024 19:50:42 +0000 (12:50 -0700)
Pull workqueue updates from Tejun Heo:
 "This cycle, a lot of workqueue changes including some that are
  significant and invasive.

   - During v6.6 cycle, unbound workqueues were updated so that they are
     more topology aware and flexible, which among other things improved
     workqueue behavior on modern multi-L3 CPUs. In the process, commit
     636b927eba5b ("workqueue: Make unbound workqueues to use per-cpu
     pool_workqueues") switched unbound workqueues to use per-CPU
     frontend pool_workqueues as a part of increasing front-back mapping
     flexibility.

     An unwelcome side effect of this change was that this made max
     concurrency enforcement per-CPU blowing up the maximum number of
     allowed concurrent executions. I incorrectly assumed that this
     wouldn't cause practical problems as most unbound workqueue users
     are self-regulate max concurrency; however, there definitely are
     which don't (e.g. on IO paths) and the drastic increase in the
     allowed max concurrency led to noticeable perf regressions in some
     use cases.

     This is now addressed by separating out max concurrency enforcement
     to a separate struct - wq_node_nr_active - which makes @max_active
     consistently mean system-wide max concurrency regardless of the
     number of CPUs or (finally) NUMA nodes. This is a rather invasive
     and, in places, a bit clunky; however, the clunkiness rises from
     the the inherent requirement to handle the disagreement between the
     execution locality domain and max concurrency enforcement domain on
     some modern machines.

     See commit 5797b1c18919 ("workqueue: Implement system-wide
     nr_active enforcement for unbound workqueues") for more details.

   - BH workqueue support is added.

     They are similar to per-CPU workqueues but execute work items in
     the softirq context. This is expected to replace tasklet. However,
     currently, it's missing the ability to disable and enable work
     items which is needed to convert many tasklet users. To avoid
     crowding this merge window too much, this will be included in the
     next merge window. A separate pull request will be sent for the
     couple conversion patches that are currently pending.

   - Waiman plugged a long-standing hole in workqueue CPU isolation
     where ordered workqueues didn't follow wq_unbound_cpumask updates.
     Ordered workqueues now follow the same rules as other unbound
     workqueues.

   - More CPU isolation improvements: Juri fixed another deficit in
     workqueue isolation where unbound rescuers don't respect
     wq_unbound_cpumask. Leonardo fixed delayed_work timers firing on
     isolated CPUs.

   - Other misc changes"

* tag 'wq-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (54 commits)
  workqueue: Drain BH work items on hot-unplugged CPUs
  workqueue: Introduce from_work() helper for cleaner callback declarations
  workqueue: Control intensive warning threshold through cmdline
  workqueue: Make @flags handling consistent across set_work_data() and friends
  workqueue: Remove clear_work_data()
  workqueue: Factor out work_grab_pending() from __cancel_work_sync()
  workqueue: Clean up enum work_bits and related constants
  workqueue: Introduce work_cancel_flags
  workqueue: Use variable name irq_flags for saving local irq flags
  workqueue: Reorganize flush and cancel[_sync] functions
  workqueue: Rename __cancel_work_timer() to __cancel_timer_sync()
  workqueue: Use rcu_read_lock_any_held() instead of rcu_read_lock_held()
  workqueue: Cosmetic changes
  workqueue, irq_work: Build fix for !CONFIG_IRQ_WORK
  workqueue: Fix queue_work_on() with BH workqueues
  async: Use a dedicated unbound workqueue with raised min_active
  workqueue: Implement workqueue_set_min_active()
  workqueue: Fix kernel-doc comment of unplug_oldest_pwq()
  workqueue: Bind unbound workqueue rescuer to wq_unbound_cpumask
  kernel/workqueue: Let rescuers follow unbound wq cpumask changes
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/core-api/workqueue.rst
init/Kconfig
init/main.c
rust/kernel/workqueue.rs

index 94314d0eb3019b760d9bb9548067235db24f5793,c0e9abbf1d2f90072154f435e8cbf88444ef2964..e8f675cc22fd91fcaf15207bb174a9667175de40
@@@ -9,7 -9,7 +9,7 @@@
                        accept_memory=eager can be used to accept all memory
                        at once during boot.
  
 -      acpi=           [HW,ACPI,X86,ARM64,RISCV64]
 +      acpi=           [HW,ACPI,X86,ARM64,RISCV64,EARLY]
                        Advanced Configuration and Power Interface
                        Format: { force | on | off | strict | noirq | rsdt |
                                  copy_dsdt }
@@@ -26,7 -26,7 +26,7 @@@
  
                        See also Documentation/power/runtime_pm.rst, pci=noacpi
  
 -      acpi_apic_instance=     [ACPI, IOAPIC]
 +      acpi_apic_instance=     [ACPI,IOAPIC,EARLY]
                        Format: <int>
                        2: use 2nd APIC table, if available
                        1,0: use 1st APIC table
@@@ -41,7 -41,7 +41,7 @@@
                        If set to native, use the device's native backlight mode.
                        If set to none, disable the ACPI backlight interface.
  
 -      acpi_force_32bit_fadt_addr
 +      acpi_force_32bit_fadt_addr [ACPI,EARLY]
                        force FADT to use 32 bit addresses rather than the
                        64 bit X_* addresses. Some firmware have broken 64
                        bit addresses for force ACPI ignore these and use
@@@ -97,7 -97,7 +97,7 @@@
                        no: ACPI OperationRegions are not marked as reserved,
                        no further checks are performed.
  
 -      acpi_force_table_verification   [HW,ACPI]
 +      acpi_force_table_verification   [HW,ACPI,EARLY]
                        Enable table checksum verification during early stage.
                        By default, this is disabled due to x86 early mapping
                        size limitation.
        acpi_no_memhotplug [ACPI] Disable memory hotplug.  Useful for kdump
                           kernels.
  
 -      acpi_no_static_ssdt     [HW,ACPI]
 +      acpi_no_static_ssdt     [HW,ACPI,EARLY]
                        Disable installation of static SSDTs at early boot time
                        By default, SSDTs contained in the RSDT/XSDT will be
                        installed automatically and they will appear under
                        Ignore the ACPI-based watchdog interface (WDAT) and let
                        a native driver control the watchdog device instead.
  
 -      acpi_rsdp=      [ACPI,EFI,KEXEC]
 +      acpi_rsdp=      [ACPI,EFI,KEXEC,EARLY]
                        Pass the RSDP address to the kernel, mostly used
                        on machines running EFI runtime service to boot the
                        second kernel for kdump.
                        to assume that this machine's pmtimer latches its value
                        and always returns good values.
  
 -      acpi_sci=       [HW,ACPI] ACPI System Control Interrupt trigger mode
 +      acpi_sci=       [HW,ACPI,EARLY] ACPI System Control Interrupt trigger mode
                        Format: { level | edge | high | low }
  
 -      acpi_skip_timer_override [HW,ACPI]
 +      acpi_skip_timer_override [HW,ACPI,EARLY]
                        Recognize and ignore IRQ0/pin2 Interrupt Override.
                        For broken nForce2 BIOS resulting in XT-PIC timer.
  
                        behave incorrectly in some ways with respect to system
                        suspend and resume to be ignored (use wisely).
  
 -      acpi_use_timer_override [HW,ACPI]
 +      acpi_use_timer_override [HW,ACPI,EARLY]
                        Use timer override. For some broken Nvidia NF5 boards
                        that require a timer override, but don't have HPET
  
 -      add_efi_memmap  [EFI; X86] Include EFI memory map in
 +      add_efi_memmap  [EFI,X86,EARLY] Include EFI memory map in
                        kernel's map of available physical RAM.
  
        agp=            [AGP]
                        do not want to use tracing_snapshot_alloc() as it needs
                        to be done where GFP_KERNEL allocations are allowed.
  
 -      allow_mismatched_32bit_el0 [ARM64]
 +      allow_mismatched_32bit_el0 [ARM64,EARLY]
                        Allow execve() of 32-bit applications and setting of the
                        PER_LINUX32 personality on systems where only a strict
                        subset of the CPUs support 32-bit EL0. When this
                                     This mode requires kvm-amd.avic=1.
                                     (Default when IOMMU HW support is present.)
  
 -      amd_pstate=     [X86]
 +      amd_pstate=     [X86,EARLY]
                        disable
                          Do not enable amd_pstate as the default
                          scaling driver for the supported processors
                        not play well with APC CPU idle - disable it if you have
                        APC and your system crashes randomly.
  
 -      apic=           [APIC,X86] Advanced Programmable Interrupt Controller
 +      apic=           [APIC,X86,EARLY] Advanced Programmable Interrupt Controller
                        Change the output verbosity while booting
                        Format: { quiet (default) | verbose | debug }
                        Change the amount of debugging information output
                        Format: apic=driver_name
                        Examples: apic=bigsmp
  
 -      apic_extnmi=    [APIC,X86] External NMI delivery setting
 +      apic_extnmi=    [APIC,X86,EARLY] External NMI delivery setting
                        Format: { bsp (default) | all | none }
                        bsp:  External NMI is delivered only to CPU 0
                        all:  External NMIs are broadcast to all CPUs as a
        bert_disable    [ACPI]
                        Disable BERT OS support on buggy BIOSes.
  
 -      bgrt_disable    [ACPI][X86]
 +      bgrt_disable    [ACPI,X86,EARLY]
                        Disable BGRT to avoid flickering OEM logo.
  
        blkdevparts=    Manual partition parsing of block device(s) for
                        embedded devices based on command line input.
                        See Documentation/block/cmdline-partition.rst
  
 -      boot_delay=     Milliseconds to delay each printk during boot.
 +      boot_delay=     [KNL,EARLY]
 +                      Milliseconds to delay each printk during boot.
                        Only works if CONFIG_BOOT_PRINTK_DELAY is enabled,
                        and you may also have to specify "lpj=".  Boot_delay
                        values larger than 10 seconds (10000) are assumed
                        erroneous and ignored.
                        Format: integer
  
 -      bootconfig      [KNL]
 +      bootconfig      [KNL,EARLY]
                        Extended command line options can be added to an initrd
                        and this will cause the kernel to look for it.
  
                        trust validation.
                        format: { id:<keyid> | builtin }
  
 -      cca=            [MIPS] Override the kernel pages' cache coherency
 +      cca=            [MIPS,EARLY] Override the kernel pages' cache coherency
                        algorithm.  Accepted values range from 0 to 7
                        inclusive. See arch/mips/include/asm/pgtable-bits.h
                        for platform specific values (SB1, Loongson3 and
                        [X86-64] hpet,tsc
  
        clocksource.arm_arch_timer.evtstrm=
 -                      [ARM,ARM64]
 +                      [ARM,ARM64,EARLY]
                        Format: <bool>
                        Enable/disable the eventstream feature of the ARM
                        architected timer so that code using WFE-based polling
                        10 seconds when built into the kernel.
  
        cma=nn[MG]@[start[MG][-end[MG]]]
 -                      [KNL,CMA]
 +                      [KNL,CMA,EARLY]
                        Sets the size of kernel global memory area for
                        contiguous memory allocations and optionally the
                        placement constraint by the physical address range of
                        kernel/dma/contiguous.c
  
        cma_pernuma=nn[MG]
 -                      [KNL,CMA]
 +                      [KNL,CMA,EARLY]
                        Sets the size of kernel per-numa memory area for
                        contiguous memory allocations. A value of 0 disables
                        per-numa CMA altogether. And If this option is not
                        they will fallback to the global default memory area.
  
        numa_cma=<node>:nn[MG][,<node>:nn[MG]]
 -                      [KNL,CMA]
 +                      [KNL,CMA,EARLY]
                        Sets the size of kernel numa memory area for
                        contiguous memory allocations. It will reserve CMA
                        area for the specified node.
                        a hypervisor.
                        Default: yes
  
 -      coherent_pool=nn[KMG]   [ARM,KNL]
 +      coherent_pool=nn[KMG]   [ARM,KNL,EARLY]
                        Sets the size of memory pool for coherent, atomic dma
                        allocations, by default set to 256K.
  
        condev=         [HW,S390] console device
        conmode=
  
 -      con3215_drop=   [S390] 3215 console drop mode.
 +      con3215_drop=   [S390,EARLY] 3215 console drop mode.
                        Format: y|n|Y|N|1|0
                        When set to true, drop data on the 3215 console when
                        the console buffer is full. In this case the
                        kernel before the cpufreq driver probes.
  
        cpu_init_udelay=N
 -                      [X86] Delay for N microsec between assert and de-assert
 +                      [X86,EARLY] Delay for N microsec between assert and de-assert
                        of APIC INIT to start processors.  This delay occurs
                        on every CPU online, such as boot, and resume from suspend.
                        Default: 10000
                        kernel more unstable.
  
        crashkernel=size[KMG][@offset[KMG]]
 -                      [KNL] Using kexec, Linux can switch to a 'crash kernel'
 +                      [KNL,EARLY] Using kexec, Linux can switch to a 'crash kernel'
                        upon panic. This parameter reserves the physical
                        memory region [offset, offset + size] for that kernel
                        image. If '@offset' is omitted, then a suitable offset
                        is selected automatically.
 -                      [KNL, X86-64, ARM64, RISCV] Select a region under 4G first, and
 -                      fall back to reserve region above 4G when '@offset'
 -                      hasn't been specified.
 +                      [KNL, X86-64, ARM64, RISCV, LoongArch] Select a region
 +                      under 4G first, and fall back to reserve region above
 +                      4G when '@offset' hasn't been specified.
                        See Documentation/admin-guide/kdump/kdump.rst for further details.
  
        crashkernel=range1:size1[,range2:size2,...][@offset]
                        Documentation/admin-guide/kdump/kdump.rst for an example.
  
        crashkernel=size[KMG],high
 -                      [KNL, X86-64, ARM64, RISCV] range could be above 4G.
 +                      [KNL, X86-64, ARM64, RISCV, LoongArch] range could be
 +                      above 4G.
                        Allow kernel to allocate physical memory region from top,
                        so could be above 4G if system have more than 4G ram
                        installed. Otherwise memory region will be allocated
                        below 4G, if available.
                        It will be ignored if crashkernel=X is specified.
        crashkernel=size[KMG],low
 -                      [KNL, X86-64, ARM64, RISCV] range under 4G. When crashkernel=X,high
 -                      is passed, kernel could allocate physical memory region
 -                      above 4G, that cause second kernel crash on system
 -                      that require some amount of low memory, e.g. swiotlb
 -                      requires at least 64M+32K low memory, also enough extra
 -                      low memory is needed to make sure DMA buffers for 32-bit
 -                      devices won't run out. Kernel would try to allocate
 +                      [KNL, X86-64, ARM64, RISCV, LoongArch] range under 4G.
 +                      When crashkernel=X,high is passed, kernel could allocate
 +                      physical memory region above 4G, that cause second kernel
 +                      crash on system that require some amount of low memory,
 +                      e.g. swiotlb requires at least 64M+32K low memory, also
 +                      enough extra low memory is needed to make sure DMA buffers
 +                      for 32-bit devices won't run out. Kernel would try to allocate
                        default size of memory below 4G automatically. The default
                        size is platform dependent.
                          --> x86: max(swiotlb_size_or_default() + 8MiB, 256MiB)
                          --> arm64: 128MiB
                          --> riscv: 128MiB
 +                        --> loongarch: 128MiB
                        This one lets the user specify own low range under 4G
                        for second kernel instead.
                        0: to disable low allocation.
                        Format: <port#>,<type>
                        See also Documentation/input/devices/joystick-parport.rst
  
 -      debug           [KNL] Enable kernel debugging (events log level).
 +      debug           [KNL,EARLY] Enable kernel debugging (events log level).
  
        debug_boot_weak_hash
 -                      [KNL] Enable printing [hashed] pointers early in the
 +                      [KNL,EARLY] Enable printing [hashed] pointers early in the
                        boot sequence.  If enabled, we use a weak hash instead
                        of siphash to hash pointers.  Use this option if you are
                        seeing instances of '(___ptrval___)') and need to see a
                        will print _a_lot_ more information - normally only
                        useful to lockdep developers.
  
 -      debug_objects   [KNL] Enable object debugging
 +      debug_objects   [KNL,EARLY] Enable object debugging
  
        debug_guardpage_minorder=
 -                      [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this
 +                      [KNL,EARLY] When CONFIG_DEBUG_PAGEALLOC is set, this
                        parameter allows control of the order of pages that will
                        be intentionally kept free (and hence protected) by the
                        buddy allocator. Bigger value increase the probability
                        help tracking down these problems.
  
        debug_pagealloc=
 -                      [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this parameter
 +                      [KNL,EARLY] When CONFIG_DEBUG_PAGEALLOC is set, this parameter
                        enables the feature at boot time. By default, it is
                        disabled and the system will work mostly the same as a
                        kernel built without CONFIG_DEBUG_PAGEALLOC.
                        useful to also enable the page_owner functionality.
                        on: enable the feature
  
 -      debugfs=        [KNL] This parameter enables what is exposed to userspace
 -                      and debugfs internal clients.
 +      debugfs=        [KNL,EARLY] This parameter enables what is exposed to
 +                      userspace and debugfs internal clients.
                        Format: { on, no-mount, off }
                        on:     All functions are enabled.
                        no-mount:
        dhash_entries=  [KNL]
                        Set number of hash buckets for dentry cache.
  
 -      disable_1tb_segments [PPC]
 +      disable_1tb_segments [PPC,EARLY]
                        Disables the use of 1TB hash page table segments. This
                        causes the kernel to fall back to 256MB segments which
                        can be useful when debugging issues that require an SLB
        disable=        [IPV6]
                        See Documentation/networking/ipv6.rst.
  
 -      disable_radix   [PPC]
 +      disable_radix   [PPC,EARLY]
                        Disable RADIX MMU mode on POWER9
  
        disable_tlbie   [PPC]
                        causing system reset or hang due to sending
                        INIT from AP to BSP.
  
 -      disable_ddw     [PPC/PSERIES]
 +      disable_ddw     [PPC/PSERIES,EARLY]
                        Disable Dynamic DMA Window support. Use this
                        to workaround buggy firmware.
  
        disable_ipv6=   [IPV6]
                        See Documentation/networking/ipv6.rst.
  
 -      disable_mtrr_cleanup [X86]
 +      disable_mtrr_cleanup [X86,EARLY]
                        The kernel tries to adjust MTRR layout from continuous
                        to discrete, to make X server driver able to add WB
                        entry later. This parameter disables that.
  
 -      disable_mtrr_trim [X86, Intel and AMD only]
 +      disable_mtrr_trim [X86, Intel and AMD only,EARLY]
                        By default the kernel will trim any uncacheable
                        memory out of your available memory pool based on
                        MTRR settings.  This parameter disables that behavior,
                        possibly causing your machine to run very slowly.
  
 -      disable_timer_pin_1 [X86]
 +      disable_timer_pin_1 [X86,EARLY]
                        Disable PIN 1 of APIC timer
                        Can be useful to work around chipset bugs.
  
  
        dscc4.setup=    [NET]
  
 -      dt_cpu_ftrs=    [PPC]
 +      dt_cpu_ftrs=    [PPC,EARLY]
                        Format: {"off" | "known"}
                        Control how the dt_cpu_ftrs device-tree binding is
                        used for CPU feature discovery and setup (if it
                        Documentation/admin-guide/dynamic-debug-howto.rst
                        for details.
  
 -      early_ioremap_debug [KNL]
 +      early_ioremap_debug [KNL,EARLY]
                        Enable debug messages in early_ioremap support. This
                        is useful for tracking down temporary early mappings
                        which are not unmapped.
  
 -      earlycon=       [KNL] Output early console device and options.
 +      earlycon=       [KNL,EARLY] Output early console device and options.
  
                        When used with no options, the early console is
                        determined by stdout-path property in device tree's
                        address must be provided, and the serial port must
                        already be setup and configured.
  
 -      earlyprintk=    [X86,SH,ARM,M68k,S390]
 +      earlyprintk=    [X86,SH,ARM,M68k,S390,UM,EARLY]
                        earlyprintk=vga
                        earlyprintk=sclp
                        earlyprintk=xen
        edd=            [EDD]
                        Format: {"off" | "on" | "skip[mbr]"}
  
 -      efi=            [EFI]
 +      efi=            [EFI,EARLY]
                        Format: { "debug", "disable_early_pci_dma",
                                  "nochunk", "noruntime", "nosoftreserve",
                                  "novamap", "no_disable_early_pci_dma" }
                        no_disable_early_pci_dma: Leave the busmaster bit set
                        on all PCI bridges while in the EFI boot stub
  
 -      efi_no_storage_paranoia [EFI; X86]
 +      efi_no_storage_paranoia [EFI,X86,EARLY]
                        Using this parameter you can use more than 50% of
                        your efi variable storage. Use this parameter only if
                        you are really sure that your UEFI does sane gc and
                        fulfills the spec otherwise your board may brick.
  
 -      efi_fake_mem=   nn[KMG]@ss[KMG]:aa[,nn[KMG]@ss[KMG]:aa,..] [EFI; X86]
 +      efi_fake_mem=   nn[KMG]@ss[KMG]:aa[,nn[KMG]@ss[KMG]:aa,..] [EFI,X86,EARLY]
                        Add arbitrary attribute to specific memory range by
                        updating original EFI memory map.
                        Region of memory which aa attribute is added to is
        eisa_irq_edge=  [PARISC,HW]
                        See header of drivers/parisc/eisa.c.
  
 -      ekgdboc=        [X86,KGDB] Allow early kernel console debugging
 +      ekgdboc=        [X86,KGDB,EARLY] Allow early kernel console debugging
                        Format: ekgdboc=kbd
  
                        This is designed to be used in conjunction with
                        See comment before function elanfreq_setup() in
                        arch/x86/kernel/cpu/cpufreq/elanfreq.c.
  
 -      elfcorehdr=[size[KMG]@]offset[KMG] [PPC,SH,X86,S390]
 +      elfcorehdr=[size[KMG]@]offset[KMG] [PPC,SH,X86,S390,EARLY]
                        Specifies physical address of start of kernel core
                        image elf header and optionally the size. Generally
                        kexec loader will pass this option to capture kernel.
                        See Documentation/admin-guide/kdump/kdump.rst for details.
  
 -      enable_mtrr_cleanup [X86]
 +      enable_mtrr_cleanup [X86,EARLY]
                        The kernel tries to adjust MTRR layout from continuous
                        to discrete, to make X server driver able to add WB
                        entry later. This parameter enables that.
                        Permit 'security.evm' to be updated regardless of
                        current integrity status.
  
 -      early_page_ext [KNL] Enforces page_ext initialization to earlier
 +      early_page_ext [KNL,EARLY] Enforces page_ext initialization to earlier
                        stages so cover more early boot allocations.
                        Please note that as side effect some optimizations
                        might be disabled to achieve that (e.g. parallelized
                        can be changed at run time by the max_graph_depth file
                        in the tracefs tracing directory. default: 0 (no limit)
  
 -      fw_devlink=     [KNL] Create device links between consumer and supplier
 +      fw_devlink=     [KNL,EARLY] Create device links between consumer and supplier
                        devices by scanning the firmware to infer the
                        consumer/supplier relationships. This feature is
                        especially useful when drivers are loaded as modules as
                        rpm --  Like "on", but also use to order runtime PM.
  
        fw_devlink.strict=<bool>
 -                      [KNL] Treat all inferred dependencies as mandatory
 +                      [KNL,EARLY] Treat all inferred dependencies as mandatory
                        dependencies. This only applies for fw_devlink=on|rpm.
                        Format: <bool>
  
        fw_devlink.sync_state =
 -                      [KNL] When all devices that could probe have finished
 +                      [KNL,EARLY] When all devices that could probe have finished
                        probing, this parameter controls what to do with
                        devices that haven't yet received their sync_state()
                        calls.
  
        gamma=          [HW,DRM]
  
 -      gart_fix_e820=  [X86-64] disable the fix e820 for K8 GART
 +      gart_fix_e820=  [X86-64,EARLY] disable the fix e820 for K8 GART
                        Format: off | on
                        default: on
  
        gather_data_sampling=
 -                      [X86,INTEL] Control the Gather Data Sampling (GDS)
 +                      [X86,INTEL,EARLY] Control the Gather Data Sampling (GDS)
                        mitigation.
  
                        Gather Data Sampling is a hardware vulnerability which
                                (that will set all pages holding image data
                                during restoration read-only).
  
 -      highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
 +      highmem=nn[KMG] [KNL,BOOT,EARLY] forces the highmem zone to have an exact
                        size of <nn>. This works even on boxes that have no
                        highmem otherwise. This also works to reduce highmem
                        size on bigger boxes.
  
        hlt             [BUGS=ARM,SH]
  
 -      hostname=       [KNL] Set the hostname (aka UTS nodename).
 +      hostname=       [KNL,EARLY] Set the hostname (aka UTS nodename).
                        Format: <string>
                        This allows setting the system's hostname during early
                        startup. This sets the name returned by gethostname.
                        Documentation/admin-guide/mm/hugetlbpage.rst.
                        Format: size[KMG]
  
 -      hugetlb_cma=    [HW,CMA] The size of a CMA area used for allocation
 +      hugetlb_cma=    [HW,CMA,EARLY] The size of a CMA area used for allocation
                        of gigantic hugepages. Or using node format, the size
                        of a CMA area per node can be specified.
                        Format: nn[KMGTPE] or (node format)
                                If specified, z/VM IUCV HVC accepts connections
                                from listed z/VM user IDs only.
  
 -      hv_nopvspin     [X86,HYPER_V] Disables the paravirt spinlock optimizations
 -                                    which allow the hypervisor to 'idle' the
 -                                    guest on lock contention.
 +      hv_nopvspin     [X86,HYPER_V,EARLY]
 +                      Disables the paravirt spinlock optimizations
 +                      which allow the hypervisor to 'idle' the guest
 +                      on lock contention.
  
        i2c_bus=        [HW]    Override the default board specific I2C bus speed
                                or register an additional I2C bus that is not
                        Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
  
  
 -      idle=           [X86]
 +      idle=           [X86,EARLY]
                        Format: idle=poll, idle=halt, idle=nomwait
                        Poll forces a polling idle loop that can slightly
                        improve the performance of waking up a idle CPU, but
                        mode generally follows that for the NaN encoding,
                        except where unsupported by hardware.
  
 -      ignore_loglevel [KNL]
 +      ignore_loglevel [KNL,EARLY]
                        Ignore loglevel setting - this will print /all/
                        kernel messages to the console. Useful for debugging.
                        We also add it as printk module parameter, so users
                        unpacking being completed before device_ and
                        late_ initcalls.
  
 -      initrd=         [BOOT] Specify the location of the initial ramdisk
 +      initrd=         [BOOT,EARLY] Specify the location of the initial ramdisk
  
 -      initrdmem=      [KNL] Specify a physical address and size from which to
 +      initrdmem=      [KNL,EARLY] Specify a physical address and size from which to
                        load the initrd. If an initrd is compiled in or
                        specified in the bootparams, it takes priority over this
                        setting.
                        Format: ss[KMG],nn[KMG]
                        Default is 0, 0
  
 -      init_on_alloc=  [MM] Fill newly allocated pages and heap objects with
 +      init_on_alloc=  [MM,EARLY] Fill newly allocated pages and heap objects with
                        zeroes.
                        Format: 0 | 1
                        Default set by CONFIG_INIT_ON_ALLOC_DEFAULT_ON.
  
 -      init_on_free=   [MM] Fill freed pages and heap objects with zeroes.
 +      init_on_free=   [MM,EARLY] Fill freed pages and heap objects with zeroes.
                        Format: 0 | 1
                        Default set by CONFIG_INIT_ON_FREE_DEFAULT_ON.
  
                        0       disables intel_idle and fall back on acpi_idle.
                        1 to 9  specify maximum depth of C-state.
  
 -      intel_pstate=   [X86]
 +      intel_pstate=   [X86,EARLY]
                        disable
                          Do not enable intel_pstate as the default
                          scaling driver for the supported processors
                          Allow per-logical-CPU P-State performance control limits using
                          cpufreq sysfs interface
  
 -      intremap=       [X86-64, Intel-IOMMU]
 +      intremap=       [X86-64,Intel-IOMMU,EARLY]
                        on      enable Interrupt Remapping (default)
                        off     disable Interrupt Remapping
                        nosid   disable Source ID checking
                strict  regions from userspace.
                relaxed
  
 -      iommu=          [X86]
 +      iommu=          [X86,EARLY]
                off
                force
                noforce
                nobypass        [PPC/POWERNV]
                        Disable IOMMU bypass, using IOMMU for PCI devices.
  
 -      iommu.forcedac= [ARM64, X86] Control IOVA allocation for PCI devices.
 +      iommu.forcedac= [ARM64,X86,EARLY] Control IOVA allocation for PCI devices.
                        Format: { "0" | "1" }
                        0 - Try to allocate a 32-bit DMA address first, before
                          falling back to the full range if needed.
                          forcing Dual Address Cycle for PCI cards supporting
                          greater than 32-bit addressing.
  
 -      iommu.strict=   [ARM64, X86, S390] Configure TLB invalidation behaviour
 +      iommu.strict=   [ARM64,X86,S390,EARLY] Configure TLB invalidation behaviour
                        Format: { "0" | "1" }
                        0 - Lazy mode.
                          Request that DMA unmap operations use deferred
                        legacy driver-specific options takes precedence.
  
        iommu.passthrough=
 -                      [ARM64, X86] Configure DMA to bypass the IOMMU by default.
 +                      [ARM64,X86,EARLY] Configure DMA to bypass the IOMMU by default.
                        Format: { "0" | "1" }
                        0 - Use IOMMU translation for DMA.
                        1 - Bypass the IOMMU for DMA.
                        See comment before marvel_specify_io7 in
                        arch/alpha/kernel/core_marvel.c.
  
 -      io_delay=       [X86] I/O delay method
 +      io_delay=       [X86,EARLY] I/O delay method
                0x80
                        Standard port 0x80 based delay
                0xed
        ip=             [IP_PNP]
                        See Documentation/admin-guide/nfs/nfsroot.rst.
  
 -      ipcmni_extend   [KNL] Extend the maximum number of unique System V
 +      ipcmni_extend   [KNL,EARLY] Extend the maximum number of unique System V
                        IPC identifiers from 32,768 to 16,777,216.
  
        irqaffinity=    [SMP] Set the default irq affinity mask
                        The argument is a cpu list, as described above.
  
        irqchip.gicv2_force_probe=
 -                      [ARM, ARM64]
 +                      [ARM,ARM64,EARLY]
                        Format: <bool>
                        Force the kernel to look for the second 4kB page
                        of a GICv2 controller even if the memory range
                        exposed by the device tree is too small.
  
        irqchip.gicv3_nolpi=
 -                      [ARM, ARM64]
 +                      [ARM,ARM64,EARLY]
                        Force the kernel to ignore the availability of
                        LPIs (and by consequence ITSs). Intended for system
                        that use the kernel as a bootloader, and thus want
                        to let secondary kernels in charge of setting up
                        LPIs.
  
 -      irqchip.gicv3_pseudo_nmi= [ARM64]
 +      irqchip.gicv3_pseudo_nmi= [ARM64,EARLY]
                        Enables support for pseudo-NMIs in the kernel. This
                        requires the kernel to be built with
                        CONFIG_ARM64_PSEUDO_NMI.
                        parameter KASAN will print report only for the first
                        invalid access.
  
 -      keep_bootcon    [KNL]
 +      keep_bootcon    [KNL,EARLY]
                        Do not unregister boot console at start. This is only
                        useful for debugging when something happens in the window
                        between unregistering the boot console and initializing
                        the real console.
  
 -      keepinitrd      [HW,ARM]
 +      keepinitrd      [HW,ARM] See retain_initrd.
  
 -      kernelcore=     [KNL,X86,IA-64,PPC]
 +      kernelcore=     [KNL,X86,IA-64,PPC,EARLY]
                        Format: nn[KMGTPE] | nn% | "mirror"
                        This parameter specifies the amount of memory usable by
                        the kernel for non-movable allocations.  The requested
                        for Movable pages.  "nn[KMGTPE]", "nn%", and "mirror"
                        are exclusive, so you cannot specify multiple forms.
  
 -      kgdbdbgp=       [KGDB,HW] kgdb over EHCI usb debug port.
 +      kgdbdbgp=       [KGDB,HW,EARLY] kgdb over EHCI usb debug port.
                        Format: <Controller#>[,poll interval]
                        The controller # is the number of the ehci usb debug
                        port as it is probed via PCI.  The poll interval is
                         kms, kbd format: kms,kbd
                         kms, kbd and serial format: kms,kbd,<ser_dev>[,baud]
  
 -      kgdboc_earlycon=        [KGDB,HW]
 +      kgdboc_earlycon=        [KGDB,HW,EARLY]
                        If the boot console provides the ability to read
                        characters and can work in polling mode, you can use
                        this parameter to tell kgdb to use it as a backend
                        blank and the first boot console that implements
                        read() will be picked.
  
 -      kgdbwait        [KGDB] Stop kernel execution and enter the
 +      kgdbwait        [KGDB,EARLY] Stop kernel execution and enter the
                        kernel debugger at the earliest opportunity.
  
        kmac=           [MIPS] Korina ethernet MAC address.
                        Configure the RouterBoard 532 series on-chip
                        Ethernet adapter MAC address.
  
 -      kmemleak=       [KNL] Boot-time kmemleak enable/disable
 +      kmemleak=       [KNL,EARLY] Boot-time kmemleak enable/disable
                        Valid arguments: on, off
                        Default: on
                        Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y,
                        See also Documentation/trace/kprobetrace.rst "Kernel
                        Boot Parameter" section.
  
 -      kpti=           [ARM64] Control page table isolation of user
 -                      and kernel address spaces.
 +      kpti=           [ARM64,EARLY] Control page table isolation of
 +                      user and kernel address spaces.
                        Default: enabled on cores which need mitigation.
                        0: force disabled
                        1: force enabled
                        for NPT.
  
        kvm-arm.mode=
 -                      [KVM,ARM] Select one of KVM/arm64's modes of operation.
 +                      [KVM,ARM,EARLY] Select one of KVM/arm64's modes of
 +                      operation.
  
                        none: Forcefully disable KVM.
  
                        used with extreme caution.
  
        kvm-arm.vgic_v3_group0_trap=
 -                      [KVM,ARM] Trap guest accesses to GICv3 group-0
 +                      [KVM,ARM,EARLY] Trap guest accesses to GICv3 group-0
                        system registers
  
        kvm-arm.vgic_v3_group1_trap=
 -                      [KVM,ARM] Trap guest accesses to GICv3 group-1
 +                      [KVM,ARM,EARLY] Trap guest accesses to GICv3 group-1
                        system registers
  
        kvm-arm.vgic_v3_common_trap=
 -                      [KVM,ARM] Trap guest accesses to GICv3 common
 +                      [KVM,ARM,EARLY] Trap guest accesses to GICv3 common
                        system registers
  
        kvm-arm.vgic_v4_enable=
 -                      [KVM,ARM] Allow use of GICv4 for direct injection of
 -                      LPIs.
 +                      [KVM,ARM,EARLY] Allow use of GICv4 for direct
 +                      injection of LPIs.
  
 -      kvm_cma_resv_ratio=n [PPC]
 +      kvm_cma_resv_ratio=n [PPC,EARLY]
                        Reserves given percentage from system memory area for
                        contiguous memory allocation for KVM hash pagetable
                        allocation.
                        (enabled). Disable by KVM if hardware lacks support
                        for it.
  
 -      l1d_flush=      [X86,INTEL]
 +      l1d_flush=      [X86,INTEL,EARLY]
                        Control mitigation for L1D based snooping vulnerability.
  
                        Certain CPUs are vulnerable to an exploit against CPU
  
                        on         - enable the interface for the mitigation
  
 -      l1tf=           [X86] Control mitigation of the L1TF vulnerability on
 +      l1tf=           [X86,EARLY] Control mitigation of the L1TF vulnerability on
                              affected CPUs
  
                        The kernel PTE inversion protection is unconditionally
  
        l3cr=           [PPC]
  
 -      lapic           [X86-32,APIC] Enable the local APIC even if BIOS
 +      lapic           [X86-32,APIC,EARLY] Enable the local APIC even if BIOS
                        disabled it.
  
        lapic=          [X86,APIC] Do not use TSC deadline
                        back to the programmable timer unit in the LAPIC.
                        Format: notscdeadline
  
 -      lapic_timer_c2_ok       [X86,APIC] trust the local apic timer
 +      lapic_timer_c2_ok       [X86,APIC,EARLY] trust the local apic timer
                        in C2 power state.
  
        libata.dma=     [LIBATA] DMA control
        lockd.nlm_udpport=M     [NFS] Assign UDP port.
                        Format: <integer>
  
 -      lockdown=       [SECURITY]
 +      lockdown=       [SECURITY,EARLY]
                        { integrity | confidentiality }
                        Enable the kernel lockdown feature. If set to
                        integrity, kernel features that allow userland to
        logibm.irq=     [HW,MOUSE] Logitech Bus Mouse Driver
                        Format: <irq>
  
 -      loglevel=       All Kernel Messages with a loglevel smaller than the
 +      loglevel=       [KNL,EARLY]
 +                      All Kernel Messages with a loglevel smaller than the
                        console loglevel will be printed to the console. It can
                        also be changed with klogd or other programs. The
                        loglevels are defined as follows:
                        6 (KERN_INFO)           informational
                        7 (KERN_DEBUG)          debug-level messages
  
 -      log_buf_len=n[KMG]      Sets the size of the printk ring buffer,
 -                      in bytes.  n must be a power of two and greater
 -                      than the minimal size. The minimal size is defined
 -                      by LOG_BUF_SHIFT kernel config parameter. There is
 -                      also CONFIG_LOG_CPU_MAX_BUF_SHIFT config parameter
 -                      that allows to increase the default size depending on
 -                      the number of CPUs. See init/Kconfig for more details.
 +      log_buf_len=n[KMG] [KNL,EARLY]
 +                      Sets the size of the printk ring buffer, in bytes.
 +                      n must be a power of two and greater than the
 +                      minimal size. The minimal size is defined by
 +                      LOG_BUF_SHIFT kernel config parameter. There
 +                      is also CONFIG_LOG_CPU_MAX_BUF_SHIFT config
 +                      parameter that allows to increase the default size
 +                      depending on the number of CPUs. See init/Kconfig
 +                      for more details.
  
        logo.nologo     [FB] Disables display of the built-in Linux logo.
                        This may be used to provide more screen space for
        max_addr=nn[KMG]        [KNL,BOOT,IA-64] All physical memory greater
                        than or equal to this physical address is ignored.
  
 -      maxcpus=        [SMP] Maximum number of processors that an SMP kernel
 +      maxcpus=        [SMP,EARLY] Maximum number of processors that an SMP kernel
                        will bring up during bootup.  maxcpus=n : n >= 0 limits
                        the kernel to bring up 'n' processors. Surely after
                        bootup you can bring up the other plugged cpu by executing
                        Format: <first>,<last>
                        Specifies range of consoles to be captured by the MDA.
  
 -      mds=            [X86,INTEL]
 +      mds=            [X86,INTEL,EARLY]
                        Control mitigation for the Micro-architectural Data
                        Sampling (MDS) vulnerability.
  
  
                        For details see: Documentation/admin-guide/hw-vuln/mds.rst
  
 -      mem=nn[KMG]     [HEXAGON] Set the memory size.
 +      mem=nn[KMG]     [HEXAGON,EARLY] Set the memory size.
                        Must be specified, otherwise memory size will be 0.
  
 -      mem=nn[KMG]     [KNL,BOOT] Force usage of a specific amount of memory
 -                      Amount of memory to be used in cases as follows:
 +      mem=nn[KMG]     [KNL,BOOT,EARLY] Force usage of a specific amount
 +                      of memory Amount of memory to be used in cases
 +                      as follows:
  
                        1 for test;
                        2 when the kernel is not able to see the whole system memory;
                        if system memory of hypervisor is not sufficient.
  
        mem=nn[KMG]@ss[KMG]
 -                      [ARM,MIPS] - override the memory layout reported by
 -                      firmware.
 +                      [ARM,MIPS,EARLY] - override the memory layout
 +                      reported by firmware.
                        Define a memory region of size nn[KMG] starting at
                        ss[KMG].
                        Multiple different regions can be specified with
        mem=nopentium   [BUGS=X86-32] Disable usage of 4MB pages for kernel
                        memory.
  
 -      memblock=debug  [KNL] Enable memblock debug messages.
 +      memblock=debug  [KNL,EARLY] Enable memblock debug messages.
  
        memchunk=nn[KMG]
                        [KNL,SH] Allow user to override the default size for
                        option.
                        See Documentation/admin-guide/mm/memory-hotplug.rst.
  
 -      memmap=exactmap [KNL,X86] Enable setting of an exact
 +      memmap=exactmap [KNL,X86,EARLY] Enable setting of an exact
                        E820 memory map, as specified by the user.
                        Such memmap=exactmap lines can be constructed based on
                        BIOS output or other requirements. See the memmap=nn@ss
                        option description.
  
        memmap=nn[KMG]@ss[KMG]
 -                      [KNL, X86, MIPS, XTENSA] Force usage of a specific region of memory.
 +                      [KNL, X86,MIPS,XTENSA,EARLY] Force usage of a specific region of memory.
                        Region of memory to be used is from ss to ss+nn.
                        If @ss[KMG] is omitted, it is equivalent to mem=nn[KMG],
                        which limits max address to nn[KMG].
                                memmap=100M@2G,100M#3G,1G!1024G
  
        memmap=nn[KMG]#ss[KMG]
 -                      [KNL,ACPI] Mark specific memory as ACPI data.
 +                      [KNL,ACPI,EARLY] Mark specific memory as ACPI data.
                        Region of memory to be marked is from ss to ss+nn.
  
        memmap=nn[KMG]$ss[KMG]
 -                      [KNL,ACPI] Mark specific memory as reserved.
 +                      [KNL,ACPI,EARLY] Mark specific memory as reserved.
                        Region of memory to be reserved is from ss to ss+nn.
                        Example: Exclude memory from 0x18690000-0x1869ffff
                                 memmap=64K$0x18690000
                        like Grub2, otherwise '$' and the following number
                        will be eaten.
  
 -      memmap=nn[KMG]!ss[KMG]
 +      memmap=nn[KMG]!ss[KMG,EARLY]
                        [KNL,X86] Mark specific memory as protected.
                        Region of memory to be used, from ss to ss+nn.
                        The memory region may be marked as e820 type 12 (0xc)
                        and is NVDIMM or ADR memory.
  
        memmap=<size>%<offset>-<oldtype>+<newtype>
 -                      [KNL,ACPI] Convert memory within the specified region
 +                      [KNL,ACPI,EARLY] Convert memory within the specified region
                        from <oldtype> to <newtype>. If "-<oldtype>" is left
                        out, the whole region will be marked as <newtype>,
                        even if previously unavailable. If "+<newtype>" is left
                        specified as e820 types, e.g., 1 = RAM, 2 = reserved,
                        3 = ACPI, 12 = PRAM.
  
 -      memory_corruption_check=0/1 [X86]
 +      memory_corruption_check=0/1 [X86,EARLY]
                        Some BIOSes seem to corrupt the first 64k of
                        memory when doing things like suspend/resume.
                        Setting this option will scan the memory
                        affects the same memory, you can use memmap=
                        to prevent the kernel from using that memory.
  
 -      memory_corruption_check_size=size [X86]
 +      memory_corruption_check_size=size [X86,EARLY]
                        By default it checks for corruption in the low
                        64k, making this memory unavailable for normal
                        use.  Use this parameter to scan for
                        corruption in more or less memory.
  
 -      memory_corruption_check_period=seconds [X86]
 +      memory_corruption_check_period=seconds [X86,EARLY]
                        By default it checks for corruption every 60
                        seconds.  Use this parameter to check at some
                        other rate.  0 disables periodic checking.
                        Note that even when enabled, there are a few cases where
                        the feature is not effective.
  
 -      memtest=        [KNL,X86,ARM,M68K,PPC,RISCV] Enable memtest
 +      memtest=        [KNL,X86,ARM,M68K,PPC,RISCV,EARLY] Enable memtest
                        Format: <integer>
                        default : 0 <disable>
                        Specifies the number of memtest passes to be
                        https://repo.or.cz/w/linux-2.6/mini2440.git
  
        mitigations=
 -                      [X86,PPC,S390,ARM64] Control optional mitigations for
 +                      [X86,PPC,S390,ARM64,EARLY] Control optional mitigations for
                        CPU vulnerabilities.  This is a set of curated,
                        arch-independent options, each of which is an
                        aggregation of existing arch-specific options.
                                               retbleed=auto,nosmt [X86]
  
        mminit_loglevel=
 -                      [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
 +                      [KNL,EARLY] When CONFIG_DEBUG_MEMORY_INIT is set, this
                        parameter allows control of the logging verbosity for
                        the additional memory initialisation checks. A value
                        of 0 disables mminit logging and a level of 4 will
                        so loglevel=8 may also need to be specified.
  
        mmio_stale_data=
 -                      [X86,INTEL] Control mitigation for the Processor
 +                      [X86,INTEL,EARLY] Control mitigation for the Processor
                        MMIO Stale Data vulnerabilities.
  
                        Processor MMIO Stale Data is a class of
        mousedev.yres=  [MOUSE] Vertical screen resolution, used for devices
                        reporting absolute coordinates, such as tablets
  
 -      movablecore=    [KNL,X86,IA-64,PPC]
 +      movablecore=    [KNL,X86,IA-64,PPC,EARLY]
                        Format: nn[KMGTPE] | nn%
                        This parameter is the complement to kernelcore=, it
                        specifies the amount of memory used for migratable
                        that the amount of memory usable for all allocations
                        is not too small.
  
 -      movable_node    [KNL] Boot-time switch to make hotplugable memory
 +      movable_node    [KNL,EARLY] Boot-time switch to make hotplugable memory
                        NUMA nodes to be movable. This means that the memory
                        of such nodes will be usable only for movable
                        allocations which rules out almost all kernel
                        [HW] Make the MicroTouch USB driver use raw coordinates
                        ('y', default) or cooked coordinates ('n')
  
 -      mtrr=debug      [X86]
 +      mtrr=debug      [X86,EARLY]
                        Enable printing debug information related to MTRR
                        registers at boot time.
  
 -      mtrr_chunk_size=nn[KMG] [X86]
 +      mtrr_chunk_size=nn[KMG,X86,EARLY]
                        used for mtrr cleanup. It is largest continuous chunk
                        that could hold holes aka. UC entries.
  
 -      mtrr_gran_size=nn[KMG] [X86]
 +      mtrr_gran_size=nn[KMG,X86,EARLY]
                        Used for mtrr cleanup. It is granularity of mtrr block.
                        Default is 1.
                        Large value could prevent small alignment from
                        using up MTRRs.
  
 -      mtrr_spare_reg_nr=n [X86]
 +      mtrr_spare_reg_nr=n [X86,EARLY]
                        Format: <integer>
                        Range: 0,7 : spare reg number
                        Default : 1
                        emulation library even if a 387 maths coprocessor
                        is present.
  
 -      no4lvl          [RISCV] Disable 4-level and 5-level paging modes. Forces
 -                      kernel to use 3-level paging instead.
 +      no4lvl          [RISCV,EARLY] Disable 4-level and 5-level paging modes.
 +                      Forces kernel to use 3-level paging instead.
  
 -      no5lvl          [X86-64,RISCV] Disable 5-level paging mode. Forces
 +      no5lvl          [X86-64,RISCV,EARLY] Disable 5-level paging mode. Forces
                        kernel to use 4-level paging instead.
  
        noaliencache    [MM, NUMA, SLAB] Disables the allocation of alien
  
        noalign         [KNL,ARM]
  
 -      noaltinstr      [S390] Disables alternative instructions patching
 -                      (CPU alternatives feature).
 +      noaltinstr      [S390,EARLY] Disables alternative instructions
 +                      patching (CPU alternatives feature).
  
 -      noapic          [SMP,APIC] Tells the kernel to not make use of any
 +      noapic          [SMP,APIC,EARLY] Tells the kernel to not make use of any
                        IOAPICs that may be present in the system.
  
        noautogroup     Disable scheduler automatic task group creation.
  
 -      nocache         [ARM]
 +      nocache         [ARM,EARLY]
  
        no_console_suspend
                        [HW] Never suspend the console
                        turn on/off it dynamically.
  
        no_debug_objects
 -                      [KNL] Disable object debugging
 +                      [KNL,EARLY] Disable object debugging
  
        nodsp           [SH] Disable hardware DSP at boot time.
  
 -      noefi           Disable EFI runtime services support.
 +      noefi           [EFI,EARLY] Disable EFI runtime services support.
  
 -      no_entry_flush  [PPC] Don't flush the L1-D cache when entering the kernel.
 +      no_entry_flush  [PPC,EARLY] Don't flush the L1-D cache when entering the kernel.
  
        noexec          [IA-64]
  
                        real-time systems.
  
        no_hash_pointers
 +                      [KNL,EARLY]
                        Force pointers printed to the console or buffers to be
                        unhashed.  By default, when a pointer is printed via %p
                        format string, that pointer is "hashed", i.e. obscured
                        the impact of the sleep instructions. This is also
                        useful when using JTAG debugger.
  
 -      nohugeiomap     [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
 +      nohugeiomap     [KNL,X86,PPC,ARM64,EARLY] Disable kernel huge I/O mappings.
  
 -      nohugevmalloc   [KNL,X86,PPC,ARM64] Disable kernel huge vmalloc mappings.
 +      nohugevmalloc   [KNL,X86,PPC,ARM64,EARLY] Disable kernel huge vmalloc mappings.
  
        nohz=           [KNL] Boottime enable/disable dynamic ticks
                        Valid arguments: on, off
        noinitrd        [RAM] Tells the kernel not to load any configured
                        initial RAM disk.
  
 -      nointremap      [X86-64, Intel-IOMMU] Do not enable interrupt
 +      nointremap      [X86-64,Intel-IOMMU,EARLY] Do not enable interrupt
                        remapping.
                        [Deprecated - use intremap=off]
  
        nointroute      [IA-64]
  
 -      noinvpcid       [X86] Disable the INVPCID cpu feature.
 +      noinvpcid       [X86,EARLY] Disable the INVPCID cpu feature.
  
        noiotrap        [SH] Disables trapped I/O port accesses.
  
  
        nojitter        [IA-64] Disables jitter checking for ITC timers.
  
 -      nokaslr         [KNL]
 +      nokaslr         [KNL,EARLY]
                        When CONFIG_RANDOMIZE_BASE is set, this disables
                        kernel and module base offset ASLR (Address Space
                        Layout Randomization).
  
 -      no-kvmapf       [X86,KVM] Disable paravirtualized asynchronous page
 +      no-kvmapf       [X86,KVM,EARLY] Disable paravirtualized asynchronous page
                        fault handling.
  
 -      no-kvmclock     [X86,KVM] Disable paravirtualized KVM clock driver
 +      no-kvmclock     [X86,KVM,EARLY] Disable paravirtualized KVM clock driver
  
 -      nolapic         [X86-32,APIC] Do not enable or use the local APIC.
 +      nolapic         [X86-32,APIC,EARLY] Do not enable or use the local APIC.
  
 -      nolapic_timer   [X86-32,APIC] Do not use the local APIC timer.
 +      nolapic_timer   [X86-32,APIC,EARLY] Do not use the local APIC timer.
  
        nomca           [IA-64] Disable machine check abort handling
  
                        shutdown the other cpus.  Instead use the REBOOT_VECTOR
                        irq.
  
 -      nopat           [X86] Disable PAT (page attribute table extension of
 +      nopat           [X86,EARLY] Disable PAT (page attribute table extension of
                        pagetables) support.
  
 -      nopcid          [X86-64] Disable the PCID cpu feature.
 +      nopcid          [X86-64,EARLY] Disable the PCID cpu feature.
  
        nopku           [X86] Disable Memory Protection Keys CPU feature found
                        in some Intel CPUs.
  
 -      nopti           [X86-64]
 +      nopti           [X86-64,EARLY]
                        Equivalent to pti=off
  
 -      nopv=           [X86,XEN,KVM,HYPER_V,VMWARE]
 +      nopv=           [X86,XEN,KVM,HYPER_V,VMWARE,EARLY]
                        Disables the PV optimizations forcing the guest to run
                        as generic guest with no PV drivers. Currently support
                        XEN HVM, KVM, HYPER_V and VMWARE guest.
  
 -      nopvspin        [X86,XEN,KVM]
 +      nopvspin        [X86,XEN,KVM,EARLY]
                        Disables the qspinlock slow path using PV optimizations
                        which allow the hypervisor to 'idle' the guest on lock
                        contention.
                        This is required for the Braillex ib80-piezo Braille
                        reader made by F.H. Papenmeier (Germany).
  
 -      nosgx           [X86-64,SGX] Disables Intel SGX kernel support.
 +      nosgx           [X86-64,SGX,EARLY] Disables Intel SGX kernel support.
  
 -      nosmap          [PPC]
 +      nosmap          [PPC,EARLY]
                        Disable SMAP (Supervisor Mode Access Prevention)
                        even if it is supported by processor.
  
 -      nosmep          [PPC64s]
 +      nosmep          [PPC64s,EARLY]
                        Disable SMEP (Supervisor Mode Execution Prevention)
                        even if it is supported by processor.
  
 -      nosmp           [SMP] Tells an SMP kernel to act as a UP kernel,
 +      nosmp           [SMP,EARLY] Tells an SMP kernel to act as a UP kernel,
                        and disable the IO APIC.  legacy for "maxcpus=0".
  
 -      nosmt           [KNL,MIPS,PPC,S390] Disable symmetric multithreading (SMT).
 +      nosmt           [KNL,MIPS,PPC,S390,EARLY] Disable symmetric multithreading (SMT).
                        Equivalent to smt=1.
  
                        [KNL,X86,PPC] Disable symmetric multithreading (SMT).
        nosoftlockup    [KNL] Disable the soft-lockup detector.
  
        nospec_store_bypass_disable
 -                      [HW] Disable all mitigations for the Speculative Store Bypass vulnerability
 +                      [HW,EARLY] Disable all mitigations for the Speculative
 +                      Store Bypass vulnerability
  
 -      nospectre_bhb   [ARM64] Disable all mitigations for Spectre-BHB (branch
 +      nospectre_bhb   [ARM64,EARLY] Disable all mitigations for Spectre-BHB (branch
                        history injection) vulnerability. System may allow data leaks
                        with this option.
  
 -      nospectre_v1    [X86,PPC] Disable mitigations for Spectre Variant 1
 +      nospectre_v1    [X86,PPC,EARLY] Disable mitigations for Spectre Variant 1
                        (bounds check bypass). With this option data leaks are
                        possible in the system.
  
 -      nospectre_v2    [X86,PPC_E500,ARM64] Disable all mitigations for
 -                      the Spectre variant 2 (indirect branch prediction)
 -                      vulnerability. System may allow data leaks with this
 -                      option.
 +      nospectre_v2    [X86,PPC_E500,ARM64,EARLY] Disable all mitigations
 +                      for the Spectre variant 2 (indirect branch
 +                      prediction) vulnerability. System may allow data
 +                      leaks with this option.
  
 -      no-steal-acc    [X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
 -                      steal time accounting. steal time is computed, but
 -                      won't influence scheduler behaviour
 +      no-steal-acc    [X86,PV_OPS,ARM64,PPC/PSERIES,RISCV,EARLY] Disable
 +                      paravirtualized steal time accounting. steal time is
 +                      computed, but won't influence scheduler behaviour
  
        nosync          [HW,M68K] Disables sync negotiation for all devices.
  
                        broken timer IRQ sources.
  
        no_uaccess_flush
 -                      [PPC] Don't flush the L1-D cache after accessing user data.
 +                      [PPC,EARLY] Don't flush the L1-D cache after accessing user data.
  
        novmcoredd      [KNL,KDUMP]
                        Disable device dump. Device dump allows drivers to
                        is set.
  
        no-vmw-sched-clock
 -                      [X86,PV_OPS] Disable paravirtualized VMware scheduler
 -                      clock and use the default one.
 +                      [X86,PV_OPS,EARLY] Disable paravirtualized VMware
 +                      scheduler clock and use the default one.
  
        nowatchdog      [KNL] Disable both lockup detectors, i.e.
                        soft-lockup and NMI watchdog (hard-lockup).
  
 -      nowb            [ARM]
 +      nowb            [ARM,EARLY]
  
 -      nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
 +      nox2apic        [X86-64,APIC,EARLY] Do not enable x2APIC mode.
  
                        NOTE: this parameter will be ignored on systems with the
                        LEGACY_XAPIC_DISABLED bit set in the
                        purges which is reported from either PAL_VM_SUMMARY or
                        SAL PALO.
  
 -      nr_cpus=        [SMP] Maximum number of processors that an SMP kernel
 +      nr_cpus=        [SMP,EARLY] Maximum number of processors that an SMP kernel
                        could support.  nr_cpus=n : n >= 1 limits the kernel to
                        support 'n' processors. It could be larger than the
                        number of already plugged CPU during bootup, later in
  
        nr_uarts=       [SERIAL] maximum number of UARTs to be registered.
  
 -      numa=off        [KNL, ARM64, PPC, RISCV, SPARC, X86] Disable NUMA, Only
 -                      set up a single NUMA node spanning all memory.
 +      numa=off        [KNL, ARM64, PPC, RISCV, SPARC, X86, EARLY]
 +                      Disable NUMA, Only set up a single NUMA node
 +                      spanning all memory.
  
        numa_balancing= [KNL,ARM64,PPC,RISCV,S390,X86] Enable or disable automatic
                        NUMA balancing.
                        This can be set from sysctl after boot.
                        See Documentation/admin-guide/sysctl/vm.rst for details.
  
 -      ohci1394_dma=early      [HW] enable debugging via the ohci1394 driver.
 +      ohci1394_dma=early      [HW,EARLY] enable debugging via the ohci1394 driver.
                        See Documentation/core-api/debugging-via-ohci1394.rst for more
                        info.
  
                                   Once locked, the boundary cannot be changed.
                                   1 indicates lock status, 0 indicates unlock status.
  
 -      oops=panic      Always panic on oopses. Default is to just kill the
 +      oops=panic      [KNL,EARLY]
 +                      Always panic on oopses. Default is to just kill the
                        process, but there is a small probability of
                        deadlocking the machine.
                        This will also cause panics on machine check exceptions.
                        can be read from sysfs at:
                        /sys/module/page_alloc/parameters/shuffle.
  
 -      page_owner=     [KNL] Boot-time page_owner enabling option.
 +      page_owner=     [KNL,EARLY] Boot-time page_owner enabling option.
                        Storage of the information about who allocated
                        each page is disabled in default. With this switch,
                        we can turn it on.
                        on: enable the feature
  
 -      page_poison=    [KNL] Boot-time parameter changing the state of
 +      page_poison=    [KNL,EARLY] Boot-time parameter changing the state of
                        poisoning on the buddy allocator, available with
                        CONFIG_PAGE_POISONING=y.
                        off: turn off poisoning (default)
                        timeout < 0: reboot immediately
                        Format: <timeout>
  
 -      panic_on_taint= Bitmask for conditionally calling panic() in add_taint()
 +      panic_on_taint= [KNL,EARLY]
 +                      Bitmask for conditionally calling panic() in add_taint()
                        Format: <hex>[,nousertaint]
                        Hexadecimal bitmask representing the set of TAINT flags
                        that will cause the kernel to panic when add_taint() is
  
        pcbit=          [HW,ISDN]
  
 -      pci=option[,option...]  [PCI] various PCI subsystem options.
 +      pci=option[,option...]  [PCI,EARLY] various PCI subsystem options.
  
                                Some options herein operate on a specific device
                                or a set of devices (<pci_dev>). These are
                        Format: { 0 | 1 }
                        See arch/parisc/kernel/pdc_chassis.c
  
 -      percpu_alloc=   Select which percpu first chunk allocator to use.
 +      percpu_alloc=   [MM,EARLY]
 +                      Select which percpu first chunk allocator to use.
                        Currently supported values are "embed" and "page".
                        Archs may support subset or none of the selections.
                        See comments in mm/percpu.c for details on each
                        execution priority.
  
        ppc_strict_facility_enable
 -                      [PPC] This option catches any kernel floating point,
 +                      [PPC,ENABLE] This option catches any kernel floating point,
                        Altivec, VSX and SPE outside of regions specifically
                        allowed (eg kernel_enable_fpu()/kernel_disable_fpu()).
                        There is some performance impact when enabling this.
  
 -      ppc_tm=         [PPC]
 +      ppc_tm=         [PPC,EARLY]
                        Format: {"off"}
                        Disable Hardware Transactional Memory
  
                        [KNL] Number of legacy pty's. Overwrites compiled-in
                        default number.
  
 -      quiet           [KNL] Disable most log messages
 +      quiet           [KNL,EARLY] Disable most log messages
  
        r128=           [HW,DRM]
  
        ramdisk_start=  [RAM] RAM disk image start address
  
        random.trust_cpu=off
 -                      [KNL] Disable trusting the use of the CPU's
 +                      [KNL,EARLY] Disable trusting the use of the CPU's
                        random number generator (if available) to
                        initialize the kernel's RNG.
  
        random.trust_bootloader=off
 -                      [KNL] Disable trusting the use of the a seed
 +                      [KNL,EARLY] Disable trusting the use of the a seed
                        passed by the bootloader (if available) to
                        initialize the kernel's RNG.
  
        randomize_kstack_offset=
 -                      [KNL] Enable or disable kernel stack offset
 +                      [KNL,EARLY] Enable or disable kernel stack offset
                        randomization, which provides roughly 5 bits of
                        entropy, frustrating memory corruption attacks
                        that depend on stack address determinism or
                        this kernel boot parameter, forcibly setting it
                        to zero.
  
 +      rcutree.enable_rcu_lazy= [KNL]
 +                      To save power, batch RCU callbacks and flush after
 +                      delay, memory pressure or callback list growing too
 +                      big.
 +
        rcuscale.gp_async= [KNL]
                        Measure performance of asynchronous
                        grace-period primitives such as call_rcu().
                        Run specified binary instead of /init from the ramdisk,
                        used for early userspace startup. See initrd.
  
 -      rdrand=         [X86]
 +      rdrand=         [X86,EARLY]
                        force - Override the decision by the kernel to hide the
                                advertisement of RDRAND support (this affects
                                certain AMD processors because of buggy BIOS
                        them.  If <base> is less than 0x10000, the region
                        is assumed to be I/O ports; otherwise it is memory.
  
 -      reservetop=     [X86-32]
 +      reservetop=     [X86-32,EARLY]
                        Format: nn[KMG]
                        Reserves a hole at the top of the kernel virtual
                        address space.
                        Useful for devices that are detected asynchronously
                        (e.g. USB and MMC devices).
  
 -      retain_initrd   [RAM] Keep initrd memory after extraction
 +      retain_initrd   [RAM] Keep initrd memory after extraction. After boot, it will
 +                      be accessible via /sys/firmware/initrd.
  
        retbleed=       [X86] Control mitigation of RETBleed (Arbitrary
                        Speculative Code Execution with Return Instructions)
                        [KNL] Disable ring 3 MONITOR/MWAIT feature on supported
                        CPUs.
  
 -      riscv_isa_fallback [RISCV]
 +      riscv_isa_fallback [RISCV,EARLY]
                        When CONFIG_RISCV_ISA_FALLBACK is not enabled, permit
                        falling back to detecting extension support by parsing
                        "riscv,isa" property on devicetree systems when the
  
        ro              [KNL] Mount root device read-only on boot
  
 -      rodata=         [KNL]
 +      rodata=         [KNL,EARLY]
                on      Mark read-only kernel memory as read-only (default).
                off     Leave read-only kernel memory writable for debugging.
                full    Mark read-only kernel memory and aliases as read-only
                        [arm64]
  
        rockchip.usb_uart
 +                      [EARLY]
                        Enable the uart passthrough on the designated usb port
                        on Rockchip SoCs. When active, the signals of the
                        debug-uart get routed to the D+ and D- pins of the usb
        sa1100ir        [NET]
                        See drivers/net/irda/sa1100_ir.c.
  
 -      sched_verbose   [KNL] Enables verbose scheduler debug messages.
 +      sched_verbose   [KNL,EARLY] Enables verbose scheduler debug messages.
  
        schedstats=     [KNL,X86] Enable or disable scheduled statistics.
                        Allowed values are enable and disable. This feature
                        non-zero "wait" parameter.  See weight_single
                        and weight_many.
  
 -      skew_tick=      [KNL] Offset the periodic timer tick per cpu to mitigate
 +      skew_tick=      [KNL,EARLY] Offset the periodic timer tick per cpu to mitigate
                        xtime_lock contention on larger systems, and/or RCU lock
                        contention on all systems with CONFIG_MAXSMP set.
                        Format: { "0" | "1" }
                                1: Fast pin select (default)
                                2: ATC IRMode
  
 -      smt=            [KNL,MIPS,S390] Set the maximum number of threads (logical
 -                      CPUs) to use per physical CPU on systems capable of
 -                      symmetric multithreading (SMT). Will be capped to the
 -                      actual hardware limit.
 +      smt=            [KNL,MIPS,S390,EARLY] Set the maximum number of threads
 +                      (logical CPUs) to use per physical CPU on systems
 +                      capable of symmetric multithreading (SMT). Will
 +                      be capped to the actual hardware limit.
                        Format: <integer>
                        Default: -1 (no limit)
  
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
                        See Documentation/admin-guide/laptops/sonypi.rst
  
 -      spectre_v2=     [X86] Control mitigation of Spectre variant 2
 +      spectre_v2=     [X86,EARLY] Control mitigation of Spectre variant 2
                        (indirect branch speculation) vulnerability.
                        The default operation protects the kernel from
                        user space attacks.
                        spectre_v2_user=auto.
  
        spec_rstack_overflow=
 -                      [X86] Control RAS overflow mitigation on AMD Zen CPUs
 +                      [X86,EARLY] Control RAS overflow mitigation on AMD Zen CPUs
  
                        off             - Disable mitigation
                        microcode       - Enable microcode mitigation only
                                          (cloud-specific mitigation)
  
        spec_store_bypass_disable=
 -                      [HW] Control Speculative Store Bypass (SSB) Disable mitigation
 +                      [HW,EARLY] Control Speculative Store Bypass (SSB) Disable mitigation
                        (Speculative Store Bypass vulnerability)
  
                        Certain CPUs are vulnerable to an exploit against a
                        #DB exception for bus lock is triggered only when
                        CPL > 0.
  
 -      srbds=          [X86,INTEL]
 +      srbds=          [X86,INTEL,EARLY]
                        Control the Special Register Buffer Data Sampling
                        (SRBDS) mitigation.
  
                        srcutree.convert_to_big must have the 0x10 bit
                        set for contention-based conversions to occur.
  
 -      ssbd=           [ARM64,HW]
 +      ssbd=           [ARM64,HW,EARLY]
                        Speculative Store Bypass Disable control
  
                        On CPUs that are vulnerable to the Speculative
                        growing up) the main stack are reserved for no other
                        mapping. Default value is 256 pages.
  
 -      stack_depot_disable= [KNL]
 +      stack_depot_disable= [KNL,EARLY]
                        Setting this to true through kernel command line will
                        disable the stack depot thereby saving the static memory
                        consumed by the stack hash table. By default this is set
                        be used to filter out binaries which have
                        not yet been made aware of AT_MINSIGSTKSZ.
  
 -      stress_hpt      [PPC]
 +      stress_hpt      [PPC,EARLY]
                        Limits the number of kernel HPT entries in the hash
                        page table to increase the rate of hash page table
                        faults on kernel addresses.
  
 -      stress_slb      [PPC]
 +      stress_slb      [PPC,EARLY]
                        Limits the number of kernel SLB entries, and flushes
                        them frequently to increase the rate of SLB faults
                        on kernel addresses.
                        This parameter controls use of the Protected
                        Execution Facility on pSeries.
  
 -      swiotlb=        [ARM,IA-64,PPC,MIPS,X86]
 +      swiotlb=        [ARM,IA-64,PPC,MIPS,X86,EARLY]
                        Format: { <int> [,<int>] | force | noforce }
                        <int> -- Number of I/O TLB slabs
                        <int> -- Second integer after comma. Number of swiotlb
                                 wouldn't be automatically used by the kernel
                        noforce -- Never use bounce buffers (for debugging)
  
 -      switches=       [HW,M68k]
 +      switches=       [HW,M68k,EARLY]
  
        sysctl.*=       [KNL]
                        Set a sysctl parameter, right before loading the init
                        <deci-seconds>: poll all this frequency
                        0: no polling (default)
  
 -      threadirqs      [KNL]
 +      threadirqs      [KNL,EARLY]
                        Force threading of all interrupt handlers except those
                        marked explicitly IRQF_NO_THREAD.
  
 -      topology=       [S390]
 +      topology=       [S390,EARLY]
                        Format: {off | on}
                        Specify if the kernel should make use of the cpu
                        topology information if the hardware supports this.
                        can be overridden by a later tsc=nowatchdog.  A console
                        message will flag any such suppression or overriding.
  
 -      tsc_early_khz=  [X86] Skip early TSC calibration and use the given
 +      tsc_early_khz=  [X86,EARLY] Skip early TSC calibration and use the given
                        value instead. Useful when the early TSC frequency discovery
                        procedure is not reliable, such as on overclocked systems
                        with CPUID.16h support and partial CPUID.15h support.
                        See Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
                        for more details.
  
 -      tsx_async_abort= [X86,INTEL] Control mitigation for the TSX Async
 +      tsx_async_abort= [X86,INTEL,EARLY] Control mitigation for the TSX Async
                        Abort (TAA) vulnerability.
  
                        Similar to Micro-architectural Data Sampling (MDS)
        unknown_nmi_panic
                        [X86] Cause panic on unknown NMI.
  
 -      unwind_debug    [X86-64]
 +      unwind_debug    [X86-64,EARLY]
                        Enable unwinder debug output.  This can be
                        useful for debugging certain unwinder error
                        conditions, including corrupt stacks and
                                        pause after every control message);
                                o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra
                                        delay after resetting its port);
 +                              p = USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT
 +                                      (Reduce timeout of the SET_ADDRESS
 +                                      request from 5000 ms to 500 ms);
                        Example: quirks=0781:5580:bk,0a5c:5834:gij
  
        usbhid.mousepoll=
                        Example: user_debug=31
  
        userpte=
 -                      [X86] Flags controlling user PTE allocations.
 +                      [X86,EARLY] Flags controlling user PTE allocations.
  
                                nohigh = do not allocate PTE pages in
                                        HIGHMEM regardless of setting
        vector=         [IA-64,SMP]
                        vector=percpu: enable percpu vector domain
  
 -      video=          [FB] Frame buffer configuration
 +      video=          [FB,EARLY] Frame buffer configuration
                        See Documentation/fb/modedb.rst.
  
        video.brightness_switch_enabled= [ACPI]
                          P     Enable page structure init time poisoning
                          -     Disable all of the above options
  
 -      vmalloc=nn[KMG] [KNL,BOOT] Forces the vmalloc area to have an exact
 -                      size of <nn>. This can be used to increase the
 -                      minimum size (128MB on x86). It can also be used to
 -                      decrease the size and leave more room for directly
 -                      mapped kernel RAM.
 +      vmalloc=nn[KMG] [KNL,BOOT,EARLY] Forces the vmalloc area to have an
 +                      exact size of <nn>. This can be used to increase
 +                      the minimum size (128MB on x86). It can also be
 +                      used to decrease the size and leave more room
 +                      for directly mapped kernel RAM.
  
 -      vmcp_cma=nn[MG] [KNL,S390]
 +      vmcp_cma=nn[MG] [KNL,S390,EARLY]
                        Sets the memory size reserved for contiguous memory
                        allocations for the vmcp device driver.
  
        vmpoff=         [KNL,S390] Perform z/VM CP command after power off.
                        Format: <command>
  
 -      vsyscall=       [X86-64]
 +      vsyscall=       [X86-64,EARLY]
                        Controls the behavior of vsyscalls (i.e. calls to
                        fixed addresses of 0xffffffffff600x00 from legacy
                        code).  Most statically-linked binaries and older
                        threshold repeatedly. They are likely good
                        candidates for using WQ_UNBOUND workqueues instead.
  
+       workqueue.cpu_intensive_warning_thresh=<uint>
+                       If CONFIG_WQ_CPU_INTENSIVE_REPORT is set, the kernel
+                       will report the work functions which violate the
+                       intensive_threshold_us repeatedly. In order to prevent
+                       spurious warnings, start printing only after a work
+                       function has violated this threshold number of times.
+                       The default is 4 times. 0 disables the warning.
        workqueue.power_efficient
                        Per-cpu workqueues are generally preferred because
                        they show better performance thanks to cache
                        When enabled, memory and cache locality will be
                        impacted.
  
 -      writecombine=   [LOONGARCH] Control the MAT (Memory Access Type) of
 -                      ioremap_wc().
 +      writecombine=   [LOONGARCH,EARLY] Control the MAT (Memory Access
 +                      Type) of ioremap_wc().
  
                        on   - Enable writecombine, use WUC for ioremap_wc()
                        off  - Disable writecombine, use SUC for ioremap_wc()
  
 -      x2apic_phys     [X86-64,APIC] Use x2apic physical mode instead of
 +      x2apic_phys     [X86-64,APIC,EARLY] Use x2apic physical mode instead of
                        default x2apic cluster mode on platforms
                        supporting x2apic.
  
                        save/restore/migration must be enabled to handle larger
                        domains.
  
 -      xen_emul_unplug=                [HW,X86,XEN]
 +      xen_emul_unplug=                [HW,X86,XEN,EARLY]
                        Unplug Xen emulated devices
                        Format: [unplug0,][unplug1]
                        ide-disks -- unplug primary master IDE devices
                                the unplug protocol
                        never -- do not unplug even if version check succeeds
  
 -      xen_legacy_crash        [X86,XEN]
 +      xen_legacy_crash        [X86,XEN,EARLY]
                        Crash from Xen panic notifier, without executing late
                        panic() code such as dumping handler.
  
 -      xen_msr_safe=   [X86,XEN]
 +      xen_msr_safe=   [X86,XEN,EARLY]
                        Format: <bool>
                        Select whether to always use non-faulting (safe) MSR
                        access functions when running as Xen PV guest. The
                        default value is controlled by CONFIG_XEN_PV_MSR_SAFE.
  
 -      xen_nopvspin    [X86,XEN]
 +      xen_nopvspin    [X86,XEN,EARLY]
                        Disables the qspinlock slowpath using Xen PV optimizations.
                        This parameter is obsoleted by "nopvspin" parameter, which
                        has equivalent effect for XEN platform.
                        has equivalent effect for XEN platform.
  
        xen_no_vector_callback
 -                      [KNL,X86,XEN] Disable the vector callback for Xen
 +                      [KNL,X86,XEN,EARLY] Disable the vector callback for Xen
                        event channel interrupts.
  
        xen_scrub_pages=        [XEN]
                        with /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
                        Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
  
 -      xen_timer_slop= [X86-64,XEN]
 +      xen_timer_slop= [X86-64,XEN,EARLY]
                        Set the timer slop (in nanoseconds) for the virtual Xen
                        timers (default is 100000). This adjusts the minimum
                        delta of virtualized Xen timers, where lower values
                        host controller quirks. Meaning of each bit can be
                        consulted in header drivers/usb/host/xhci.h.
  
 -      xmon            [PPC]
 +      xmon            [PPC,EARLY]
                        Format: { early | on | rw | ro | off }
                        Controls if xmon debugger is enabled. Default is off.
                        Passing only "xmon" is equivalent to "xmon=early".
index 3599cf9267b4766c4628dde7d27d98fb95e325a9,9572609b5263117cb60c381c2233fa868e6ee3c3..ed73c612174d4c99d3329cc1443b553537e049db
@@@ -77,10 -77,12 +77,12 @@@ wants a function to be executed asynchr
  item pointing to that function and queue that work item on a
  workqueue.
  
- Special purpose threads, called worker threads, execute the functions
- off of the queue, one after the other.  If no work is queued, the
- worker threads become idle.  These worker threads are managed in so
- called worker-pools.
+ A work item can be executed in either a thread or the BH (softirq) context.
+ For threaded workqueues, special purpose threads, called [k]workers, execute
+ the functions off of the queue, one after the other. If no work is queued,
+ the worker threads become idle. These worker threads are managed in
+ worker-pools.
  
  The cmwq design differentiates between the user-facing workqueues that
  subsystems and drivers queue work items on and the backend mechanism
@@@ -91,6 -93,12 +93,12 @@@ for high priority ones, for each possib
  worker-pools to serve work items queued on unbound workqueues - the
  number of these backing pools is dynamic.
  
+ BH workqueues use the same framework. However, as there can only be one
+ concurrent execution context, there's no need to worry about concurrency.
+ Each per-CPU BH worker pool contains only one pseudo worker which represents
+ the BH execution context. A BH workqueue can be considered a convenience
+ interface to softirq.
  Subsystems and drivers can create and queue work items through special
  workqueue API functions as they see fit. They can influence some
  aspects of the way the work items are executed by setting flags on the
@@@ -106,7 -114,7 +114,7 @@@ unless specifically overridden, a work 
  be queued on the worklist of either normal or highpri worker-pool that
  is associated to the CPU the issuer is running on.
  
- For any worker pool implementation, managing the concurrency level
+ For any thread pool implementation, managing the concurrency level
  (how many execution contexts are active) is an important issue.  cmwq
  tries to keep the concurrency at a minimal but sufficient level.
  Minimal to save resources and sufficient in that the system is used at
@@@ -164,6 -172,17 +172,17 @@@ resources, scheduled and executed
  ``flags``
  ---------
  
+ ``WQ_BH``
+   BH workqueues can be considered a convenience interface to softirq. BH
+   workqueues are always per-CPU and all BH work items are executed in the
+   queueing CPU's softirq context in the queueing order.
+   All BH workqueues must have 0 ``max_active`` and ``WQ_HIGHPRI`` is the
+   only allowed additional flag.
+   BH work items cannot sleep. All other features such as delayed queueing,
+   flushing and canceling are supported.
  ``WQ_UNBOUND``
    Work items queued to an unbound wq are served by the special
    worker-pools which host workers which are not bound to any
@@@ -237,15 -256,11 +256,11 @@@ may queue at the same time.  Unless the
  throttling the number of active work items, specifying '0' is
  recommended.
  
- Some users depend on the strict execution ordering of ST wq.  The
- combination of ``@max_active`` of 1 and ``WQ_UNBOUND`` used to
- achieve this behavior.  Work items on such wq were always queued to the
- unbound worker-pools and only one work item could be active at any given
- time thus achieving the same ordering property as ST wq.
- In the current implementation the above configuration only guarantees
- ST behavior within a given NUMA node. Instead ``alloc_ordered_workqueue()`` should
- be used to achieve system-wide ST behavior.
+ Some users depend on strict execution ordering where only one work item
+ is in flight at any given time and the work items are processed in
+ queueing order. While the combination of ``@max_active`` of 1 and
+ ``WQ_UNBOUND`` used to achieve this behavior, this is no longer the
+ case. Use ``alloc_ordered_queue()`` instead.
  
  
  Example Execution Scenarios
@@@ -446,7 -461,7 +461,7 @@@ The command used: :
  
  There are 24 issuers, each issuing 64 IOs concurrently. ``--verify=sha512``
  makes ``fio`` generate and read back the content each time which makes
 -execution locality matter between the issuer and ``kcryptd``. The followings
 +execution locality matter between the issuer and ``kcryptd``. The following
  are the read bandwidths and CPU utilizations depending on different affinity
  scope settings on ``kcryptd`` measured over five runs. Bandwidths are in
  MiBps, and CPU util in percents.
diff --combined init/Kconfig
index bee58f7468c36a8f030c73f1c16bbfb2ab9acab2,0d21c9e0398f92d526e12128b39338a3534a458c..7c5df7b0b5760c8d2235a688ffe8d98ad3ebf340
@@@ -89,15 -89,6 +89,15 @@@ config CC_HAS_ASM_GOTO_TIED_OUTPU
        # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
        def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
  
 +config GCC_ASM_GOTO_OUTPUT_WORKAROUND
 +      bool
 +      depends on CC_IS_GCC && CC_HAS_ASM_GOTO_OUTPUT
 +      # Fixed in GCC 14, 13.3, 12.4 and 11.5
 +      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
 +      default y if GCC_VERSION < 110500
 +      default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
 +      default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
 +
  config TOOLS_SUPPORT_RELR
        def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
  
@@@ -115,7 -106,7 +115,7 @@@ config CONSTRUCTOR
        bool
  
  config IRQ_WORK
-       bool
+       def_bool y if SMP
  
  config BUILDTIME_TABLE_SORT
        bool
@@@ -876,26 -867,14 +876,26 @@@ config CC_IMPLICIT_FALLTHROUG
        default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
        default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
  
 -# Currently, disable gcc-11+ array-bounds globally.
 +# Currently, disable gcc-10+ array-bounds globally.
  # It's still broken in gcc-13, so no upper bound yet.
 -config GCC11_NO_ARRAY_BOUNDS
 +config GCC10_NO_ARRAY_BOUNDS
        def_bool y
  
  config CC_NO_ARRAY_BOUNDS
        bool
 -      default y if CC_IS_GCC && GCC_VERSION >= 110000 && GCC11_NO_ARRAY_BOUNDS
 +      default y if CC_IS_GCC && GCC_VERSION >= 100000 && GCC10_NO_ARRAY_BOUNDS
 +
 +# Currently, disable -Wstringop-overflow for GCC globally.
 +config GCC_NO_STRINGOP_OVERFLOW
 +      def_bool y
 +
 +config CC_NO_STRINGOP_OVERFLOW
 +      bool
 +      default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
 +
 +config CC_STRINGOP_OVERFLOW
 +      bool
 +      default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
  
  #
  # For architectures that know their GCC __int128 support is sound
diff --combined init/main.c
index 2fbf6a3114d57a8458bfcd0fd3d3b43163714010,685db36c999f3456013fe9dd93274bf4d9b72237..f7ff31f878b8a8ad9f95226932cfe09d6b90692e
@@@ -99,7 -99,6 +99,7 @@@
  #include <linux/init_syscalls.h>
  #include <linux/stackdepot.h>
  #include <linux/randomize_kstack.h>
 +#include <linux/pidfs.h>
  #include <net/net_namespace.h>
  
  #include <asm/io.h>
@@@ -1060,7 -1059,6 +1060,7 @@@ void start_kernel(void
        seq_file_init();
        proc_root_init();
        nsfs_init();
 +      pidfs_init();
        cpuset_init();
        cgroup_init();
        taskstats_init_early();
@@@ -1547,6 -1545,7 +1547,7 @@@ static noinline void __init kernel_init
        sched_init_smp();
  
        workqueue_init_topology();
+       async_init();
        padata_init();
        page_alloc_init_late();
  
diff --combined rust/kernel/workqueue.rs
index 544f0c51f1b78f1e3efa6862699fe9f0555223ec,d00231e18007336fb3da078761a12e312cc3ce34..480cb292e7c21d2d0e242d01844b10ffac92053a
  //!
  //! # The raw API
  //!
 -//! The raw API consists of the `RawWorkItem` trait, where the work item needs to provide an
 +//! The raw API consists of the [`RawWorkItem`] trait, where the work item needs to provide an
  //! arbitrary function that knows how to enqueue the work item. It should usually not be used
  //! directly, but if you want to, you can use it without using the pieces from the safe API.
  //!
  //! # The safe API
  //!
 -//! The safe API is used via the `Work` struct and `WorkItem` traits. Furthermore, it also includes
 -//! a trait called `WorkItemPointer`, which is usually not used directly by the user.
 +//! The safe API is used via the [`Work`] struct and [`WorkItem`] traits. Furthermore, it also
 +//! includes a trait called [`WorkItemPointer`], which is usually not used directly by the user.
  //!
 -//!  * The `Work` struct is the Rust wrapper for the C `work_struct` type.
 -//!  * The `WorkItem` trait is implemented for structs that can be enqueued to a workqueue.
 -//!  * The `WorkItemPointer` trait is implemented for the pointer type that points at a something
 -//!    that implements `WorkItem`.
 +//!  * The [`Work`] struct is the Rust wrapper for the C `work_struct` type.
 +//!  * The [`WorkItem`] trait is implemented for structs that can be enqueued to a workqueue.
 +//!  * The [`WorkItemPointer`] trait is implemented for the pointer type that points at a something
 +//!    that implements [`WorkItem`].
  //!
  //! ## Example
  //!
@@@ -35,7 -35,8 +35,7 @@@
  //! ```
  //! use kernel::prelude::*;
  //! use kernel::sync::Arc;
 -//! use kernel::workqueue::{self, Work, WorkItem};
 -//! use kernel::{impl_has_work, new_work};
 +//! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
  //!
  //! #[pin_data]
  //! struct MyStruct {
@@@ -77,7 -78,8 +77,7 @@@
  //! ```
  //! use kernel::prelude::*;
  //! use kernel::sync::Arc;
 -//! use kernel::workqueue::{self, Work, WorkItem};
 -//! use kernel::{impl_has_work, new_work};
 +//! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
  //!
  //! #[pin_data]
  //! struct MyStruct {
@@@ -145,7 -147,6 +145,7 @@@ macro_rules! new_work 
          $crate::workqueue::Work::new($crate::optional_name!($($name)?), $crate::static_lock_class!())
      };
  }
 +pub use new_work;
  
  /// A kernel work queue.
  ///
@@@ -167,7 -168,7 +167,7 @@@ impl Queue 
      /// # Safety
      ///
      /// The caller must ensure that the provided raw pointer is not dangling, that it points at a
 -    /// valid workqueue, and that it remains valid until the end of 'a.
 +    /// valid workqueue, and that it remains valid until the end of `'a`.
      pub unsafe fn from_raw<'a>(ptr: *const bindings::workqueue_struct) -> &'a Queue {
          // SAFETY: The `Queue` type is `#[repr(transparent)]`, so the pointer cast is valid. The
          // caller promises that the pointer is not dangling.
          // stay valid until we call the function pointer in the `work_struct`, so the access is ok.
          unsafe {
              w.__enqueue(move |work_ptr| {
-                 bindings::queue_work_on(bindings::WORK_CPU_UNBOUND as _, queue_ptr, work_ptr)
+                 bindings::queue_work_on(
+                     bindings::wq_misc_consts_WORK_CPU_UNBOUND as _,
+                     queue_ptr,
+                     work_ptr,
+                 )
              })
          }
      }
      }
  }
  
 -/// A helper type used in `try_spawn`.
 +/// A helper type used in [`try_spawn`].
 +///
 +/// [`try_spawn`]: Queue::try_spawn
  #[pin_data]
  struct ClosureWork<T> {
      #[pin]
@@@ -254,16 -257,14 +258,16 @@@ impl<T: FnOnce()> WorkItem for ClosureW
  /// actual value of the id is not important as long as you use different ids for different fields
  /// of the same struct. (Fields of different structs need not use different ids.)
  ///
 -/// Note that the id is used only to select the right method to call during compilation. It wont be
 +/// Note that the id is used only to select the right method to call during compilation. It won't be
  /// part of the final executable.
  ///
  /// # Safety
  ///
 -/// Implementers must ensure that any pointers passed to a `queue_work_on` closure by `__enqueue`
 +/// Implementers must ensure that any pointers passed to a `queue_work_on` closure by [`__enqueue`]
  /// remain valid for the duration specified in the guarantees section of the documentation for
 -/// `__enqueue`.
 +/// [`__enqueue`].
 +///
 +/// [`__enqueue`]: RawWorkItem::__enqueue
  pub unsafe trait RawWorkItem<const ID: u64> {
      /// The return type of [`Queue::enqueue`].
      type EnqueueOutput;
  
  /// Defines the method that should be called directly when a work item is executed.
  ///
 -/// This trait is implemented by `Pin<Box<T>>` and `Arc<T>`, and is mainly intended to be
 +/// This trait is implemented by `Pin<Box<T>>` and [`Arc<T>`], and is mainly intended to be
  /// implemented for smart pointer types. For your own structs, you would implement [`WorkItem`]
 -/// instead. The `run` method on this trait will usually just perform the appropriate
 -/// `container_of` translation and then call into the `run` method from the [`WorkItem`] trait.
 +/// instead. The [`run`] method on this trait will usually just perform the appropriate
 +/// `container_of` translation and then call into the [`run`][WorkItem::run] method from the
 +/// [`WorkItem`] trait.
  ///
  /// This trait is used when the `work_struct` field is defined using the [`Work`] helper.
  ///
@@@ -313,10 -313,8 +317,10 @@@ pub unsafe trait WorkItemPointer<const 
      ///
      /// # Safety
      ///
 -    /// The provided `work_struct` pointer must originate from a previous call to `__enqueue` where
 -    /// the `queue_work_on` closure returned true, and the pointer must still be valid.
 +    /// The provided `work_struct` pointer must originate from a previous call to [`__enqueue`]
 +    /// where the `queue_work_on` closure returned true, and the pointer must still be valid.
 +    ///
 +    /// [`__enqueue`]: RawWorkItem::__enqueue
      unsafe extern "C" fn run(ptr: *mut bindings::work_struct);
  }
  
@@@ -334,14 -332,12 +338,14 @@@ pub trait WorkItem<const ID: u64 = 0> 
  
  /// Links for a work item.
  ///
 -/// This struct contains a function pointer to the `run` function from the [`WorkItemPointer`]
 +/// This struct contains a function pointer to the [`run`] function from the [`WorkItemPointer`]
  /// trait, and defines the linked list pointers necessary to enqueue a work item in a workqueue.
  ///
  /// Wraps the kernel's C `struct work_struct`.
  ///
  /// This is a helper type used to associate a `work_struct` with the [`WorkItem`] that uses it.
 +///
 +/// [`run`]: WorkItemPointer::run
  #[repr(transparent)]
  pub struct Work<T: ?Sized, const ID: u64 = 0> {
      work: Opaque<bindings::work_struct>,
@@@ -404,8 -400,9 +408,8 @@@ impl<T: ?Sized, const ID: u64> Work<T, 
  /// like this:
  ///
  /// ```no_run
 -/// use kernel::impl_has_work;
  /// use kernel::prelude::*;
 -/// use kernel::workqueue::Work;
 +/// use kernel::workqueue::{impl_has_work, Work};
  ///
  /// struct MyWorkItem {
  ///     work_field: Work<MyWorkItem, 1>,
  /// }
  /// ```
  ///
 -/// Note that since the `Work` type is annotated with an id, you can have several `work_struct`
 +/// Note that since the [`Work`] type is annotated with an id, you can have several `work_struct`
  /// fields by using a different id for each one.
  ///
  /// # Safety
  ///
 -/// The [`OFFSET`] constant must be the offset of a field in Self of type [`Work<T, ID>`]. The methods on
 -/// this trait must have exactly the behavior that the definitions given below have.
 +/// The [`OFFSET`] constant must be the offset of a field in `Self` of type [`Work<T, ID>`]. The
 +/// methods on this trait must have exactly the behavior that the definitions given below have.
  ///
 -/// [`Work<T, ID>`]: Work
  /// [`impl_has_work!`]: crate::impl_has_work
  /// [`OFFSET`]: HasWork::OFFSET
  pub unsafe trait HasWork<T, const ID: u64 = 0> {
      /// The offset of the [`Work<T, ID>`] field.
 -    ///
 -    /// [`Work<T, ID>`]: Work
      const OFFSET: usize;
  
      /// Returns the offset of the [`Work<T, ID>`] field.
      ///
 -    /// This method exists because the [`OFFSET`] constant cannot be accessed if the type is not Sized.
 +    /// This method exists because the [`OFFSET`] constant cannot be accessed if the type is not
 +    /// [`Sized`].
      ///
 -    /// [`Work<T, ID>`]: Work
      /// [`OFFSET`]: HasWork::OFFSET
      #[inline]
      fn get_work_offset(&self) -> usize {
      /// # Safety
      ///
      /// The provided pointer must point at a valid struct of type `Self`.
 -    ///
 -    /// [`Work<T, ID>`]: Work
      #[inline]
      unsafe fn raw_get_work(ptr: *mut Self) -> *mut Work<T, ID> {
          // SAFETY: The caller promises that the pointer is valid.
      /// # Safety
      ///
      /// The pointer must point at a [`Work<T, ID>`] field in a struct of type `Self`.
 -    ///
 -    /// [`Work<T, ID>`]: Work
      #[inline]
      unsafe fn work_container_of(ptr: *mut Work<T, ID>) -> *mut Self
      where
  /// # Examples
  ///
  /// ```
 -/// use kernel::impl_has_work;
  /// use kernel::sync::Arc;
 -/// use kernel::workqueue::{self, Work};
 +/// use kernel::workqueue::{self, impl_has_work, Work};
  ///
  /// struct MyStruct {
  ///     work_field: Work<MyStruct, 17>,
  ///     impl HasWork<MyStruct, 17> for MyStruct { self.work_field }
  /// }
  /// ```
 -///
 -/// [`HasWork<T, ID>`]: HasWork
  #[macro_export]
  macro_rules! impl_has_work {
      ($(impl$(<$($implarg:ident),*>)?
          }
      )*};
  }
 +pub use impl_has_work;
  
  impl_has_work! {
      impl<T> HasWork<Self> for ClosureWork<T> { self.work }
This page took 0.388352 seconds and 4 git commands to generate.