Skip to content

refactor(log): rename ringlog to deferlog and tidy log Kconfig - #130

Merged
FengHeting merged 1 commit into
ViudiraTech:developfrom
FengHeting:refactor/log-kconfig-cleanup
Nov 5, 2026
Merged

FengHeting merged 1 commit into
ViudiraTech:developfrom
FengHeting:refactor/log-kconfig-cleanup

Conversation

@FengHeting

Copy link
Copy Markdown
Contributor

Summary

ringlog named the mechanism after its internal layout rather than its
purpose: it stages formatted messages and replays them through plogk().
Several log-related Kconfig symbols shared the same naming problem, and
NMI_LOG_MAX_CPUS was presented as log-only although it sizes shared
per-CPU tables.

This PR renames the buffer to deferlog, groups the kernel-interface
limits by purpose, and moves each option under the subsystem that owns
it. No runtime behavior changes.

Changes

  • Rename ringlog to deferlog across the file, type, and API
    (deferlog_t, deferlog_write(), deferlog_print(),
    CONFIG_DEFERLOG_*) and update all 12 call sites.
  • Reorganize Kernel interfaces into System call limits,
    Kernel logging, and Uevent notifications.
  • Gate DEFERLOG_MAX_LENGTH / DEFERLOG_ENTRY_COUNT on KERNEL_LOG,
    since deferred entries are only flushed through plogk().
  • Move ACPI_MAX_GPE_HANDLERS under Device Drivers -> ACPI support.
  • Rename NMI_LOG_MAX_CPUS to PER_CPU_TABLE_MAX_CPUS and move it
    under Processor type and features; it sizes printk recursion
    tracking, NMI message parking, and AP microcode revision storage, so
    it must not depend on KERNEL_LOG.
  • Clarify the KERNEL_LOG help text: disabling it compiles plogk()
    out entirely; printk() and the console path are unaffected.
  • Regenerate .config-default.

Testing

  • clang-format --dry-run --Werror on all changed C/H files
  • make -j$(nproc) succeeds and produces UxImage / Uinxed-x64.iso
  • Regenerated .config-default is stable under
    kconfig-conf --olddefconfig (cmp clean)
  • With CONFIG_KERNEL_LOG=n, PER_CPU_TABLE_MAX_CPUS remains
    configurable while DEFERLOG_* disappear
  • CI covers make check (clang-tidy); local validation used
    clang-format and a full build

Notes

Config symbol renames in this PR:
CONFIG_LOG_MAX_LENGTH -> CONFIG_DEFERLOG_MAX_LENGTH,
CONFIG_LOG_BUFFER_SIZE -> CONFIG_DEFERLOG_ENTRY_COUNT,
CONFIG_NMI_LOG_MAX_CPUS -> CONFIG_PER_CPU_TABLE_MAX_CPUS.
Existing local .config files should be regenerated or renamed; the
default values (1024 / 32 / 256) are unchanged.

The deferred log buffer only stages messages for later plogk() output, so
name it deferlog and keep its capacity options under Kernel logging.
Group Kernel interfaces options into scoped submenus, move ACPI GPE
sizing under Device Drivers, and relocate the shared per-CPU table bound
to Processor type and features as PER_CPU_TABLE_MAX_CPUS.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: MicroFish <2609948707@qq.com>
@FengHeting
FengHeting merged commit 74a61c8 into ViudiraTech:develop Nov 5, 2026
2 checks passed
@FengHeting
FengHeting deleted the refactor/log-kconfig-cleanup branch November 5, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant