Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2026-StellarOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • StellarOS
  • OSKernel2026-StellarOS
  • Merge requests
  • !22

fix_smp

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged StellarOS requested to merge busybox/ltp into main Apr 08, 2026
  • Overview 12
  • Commits 15
  • Pipelines 0
  • Changes 29

Created by: Alic3r3L1cwhk

This pull request introduces several important improvements for SMP (Symmetric Multi-Processing) support, especially around TLB (Translation Lookaside Buffer) shootdown, and refactors locking for better safety and performance. It also adds new system calls and improves file system and memory management code. The most significant changes are grouped and summarized below:

SMP and TLB Shootdown Support

  • Added a TLB shootdown mechanism: introduced TlbShootdownMsg, per-CPU TLB shootdown queues, and functions tlb_shootdown and handle_tlb_shootdown to ensure TLB consistency across CPUs when page tables are modified. This is now called in sys_munmap and sys_mprotect after unmapping or changing permissions. [1] [2] [3] [4] [5] [6]

Locking and Concurrency Refactoring

  • Replaced uses of spin::Mutex with SpinNoIrqLock in the FAT32 filesystem module, improving SMP safety and reducing interrupt-related deadlocks. All FAT32 operations now use exclusive_access() instead of .lock(). [1] [2] [3] [4] [5] [6] [7]
  • Removed unnecessary console output locks and simplified output handling by introducing print_bytes for direct byte output. This also affects the SbiConsoleOut implementation. [1] [2] [3] [4]

System Call Additions and Improvements

  • Added implementations for sys_fsync and sys_fdatasync, returning success or error codes as appropriate (no-op for ramdisk).
  • Improved sys_faccessat with null pointer checks and logging.

Memory and Page Table Management

  • Fixed sys_mprotect to update only page table flags instead of remapping pages, preserving page contents. Also ensures TLB shootdown is performed after permission changes.
  • Minor export fix for PTEFlags in mm/mod.rs and improved imports. [1] [2]

Wait Queue Documentation and Behavior

  • Updated documentation to clarify SMP safety and locking semantics for WaitQueue. Improved wakeup methods to release locks before waking tasks, reducing risk of nested locks and deadlocks. [1] [2] [3] [4] [5] [6]

These changes collectively improve SMP safety, TLB consistency, and kernel robustness, while also refactoring code for clarity and maintainability.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: busybox/ltp