Kernel User Stack Relocation Without System Suspension
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing systems face significant performance issues and downtime when relocating kernel and user stacks due to the need to suspend all CPUs and devices, as traditional hardware-based copy-rename methods are inefficient and limit scalability in large servers.
Innovation Solution
Implementing a method where kernel and user stack data is stored in relocatable memory, allowing for relocation without shutting down the system by using a dedicated thread to manage the relocation process, including the creation of relocation requests and the use of shared and exclusive locks to prevent deadlocks, and employing a system call to determine whether the source page contains stack data of the relocation thread.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If hardware-based copy-rename algorithm is used to relocate kernel and user stacks, then relocation can be achieved, but all CPUs must be paused and all devices suspended, causing drastic performance degradation
Solution Approach 1:
The patent segments the relocation process by identifying and excluding stack pages from the relocation operation. Instead of pausing all CPUs and suspending all devices, the system divides memory pages into relocatable and non-relocatable categories, allowing relocation to proceed without affecting stack integrity or system operation.
Solution Approach 2:
The patent implements dynamic detection of stack pages during the relocation process. The system continuously identifies which pages contain stack data and adjusts the relocation operation accordingly, allowing the relocation thread to adapt its behavior based on real-time system state rather than requiring static system suspension.
2Reliability
If kernel memory is allocated on minimum number of boards, then copy-rename relocation is possible, but memory latency increases and bus traffic increases, affecting scalability
Solution Approach 1:
The patent segments kernel memory allocation across multiple boards, allowing stack pages to be distributed rather than concentrated on a minimum number of boards. This segmentation enables parallel access paths and reduces contention on memory buses, thereby reducing latency and improving scalability while maintaining relocation capability.
3Reliability
If system is shut down for memory board replacement, then relocation of non-relocatable data can be achieved, but system downtime occurs
Solution Approach 1:
The patent performs preliminary identification of stack pages before the relocation operation begins. By detecting and marking stack-containing pages in advance, the system prepares the relocation operation to exclude these pages, enabling hot relocation without system shutdown while maintaining data integrity.
Solution Approach 2:
The patent introduces a dedicated relocation thread as an intermediary that manages the relocation process. This thread coordinates between the memory subsystem and the running system, enabling relocation operations to proceed in the background without requiring system shutdown or affecting user processes.
4Productivity
If dedicated relocation thread is used to manage relocation requests, then relocation can proceed without system suspension, but system complexity increases
Solution Approach 1:
The patent implements a universal relocation thread that handles multiple types of relocation requests (memory board replacement, load balancing, fault migration) through a single dedicated mechanism. This multi-functional approach reduces overall system complexity compared to having separate relocation mechanisms for each scenario.
Data Source
AI summary
Kernel and user stack data is stored in relocatable memory. A kernel thread or a user thread can move its own stack data by creating a relocation request and adding the relocation request to a queue of a dedicated thread. The dedicated thread performs the relocation on behalf of the requesting kernel or user thread.


