Multi-core device RCU memory release method and system and readable storage medium

By using the main task thread and iterative thread in multi-core devices to obtain the RCU memory state and free memory in the RCU task thread, the problem of RCU memory not being released in time due to the long execution time of dp thread tasks is solved, and the performance and stability of firewall devices are improved.

CN119806823APending Publication Date: 2025-04-11WUHAN SIPU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411867316.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, the execution time of dp thread tasks is too long, causing RCU memory to be unable to be released in time, especially when the memory resources of the firewall system are tight, which will cause packet forwarding to fail, seriously affecting the performance of the device.

Method used

By introducing the main task thread and iterative thread in a multi-core device, obtaining the target hash table and performing bucket chain traversal, obtaining the RCU memory state, and releasing the RCU memory of the main task thread according to this state in the RCU task thread.

Benefits of technology

It realizes the timely release of RCU memory, avoids the failure of forwarding packets caused by insufficient memory, and improves the performance and stability of firewall devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806823A_ABST
    Figure CN119806823A_ABST
Patent Text Reader

Abstract

The invention provides a multi-core device RCU memory release method and system and a readable storage medium, the method is applied to the multi-core device RCU memory release system, the multi-core device RCU memory release system comprises a plurality of main task threads, each main task thread is used for processing a plurality of different main thread tasks, and each main thread task is used for processing a plurality of different main thread tasks. The method comprises the following steps: acquiring a target hash table corresponding to all the main task threads; according to the target hash table, performing barrel chain traversal for multiple times to obtain an RCU memory state; the RCU memory state corresponds to the RCU memory use condition of each main thread task in a plurality of main task threads; and releasing the RCU memory of the main task thread according to the RCU memory state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a method, system and readable storage medium for releasing RCU memory of a multi-core device. Background Art

[0002] RCU is mainly used to optimize the performance of memory read operations between threads while ensuring the security of write operations. On the firewall device, each CPU core will run a dp task, in which configuration processing, message forwarding, device operation status statistics, etc. are completed. In addition, an RCU task will be started to determine whether to release the memory on the memory chain to be released by checking the status of the registered thread.

[0003] When the dp thread task starts, it registers with RCU that this thread uses RCU memory, and updates the thread status at the end of each subsequent task. The RCU task performs the memory release operation only after checking that all dp threads have used up the memory to be released. Only after the RCU task removes the memory from the release chain and releases it, can the memory be reallocated and used again.

[0004] From the above memory release process, we can see that when a DP thread task takes too long to execute, such as when there are a large number of sessions in the system, when traversing the session statistics running information, regardless of whether the memory is occupied, the memory on the memory chain to be released cannot be released in time. If the firewall system memory resources are tight, the message forwarding will frequently fail due to the failure to apply for memory, which seriously affects the performance of the device. Summary of the invention

[0005] The present application provides a multi-core device RCU memory release method, system and readable storage medium to solve the problem that the RCU memory corresponding to the existing dp thread cannot be released in time.

[0006] In a first aspect, the present application provides a multi-core device RCU memory release method, wherein the method is applied to a multi-core device RCU memory release system, the multi-core device RCU memory release system includes a plurality of main task threads, each main task thread is used to process a plurality of different main thread tasks, the method includes:

[0007] Obtain a target hash table corresponding to all the main task threads;

[0008] Perform several bucket chain traversals according to the target hash table to obtain an RCU memory state; the RCU memory state corresponds to the RCU memory usage of each of the main thread tasks in the several main task threads;

[0009] The RCU memory of the main task thread is released according to the RCU memory state.

[0010] Preferably, the multi-core device RCU memory release system further includes an RCU task thread, and the step of obtaining a target hash table corresponding to a plurality of main task threads includes:

[0011] Register all the main task threads with the RCU task thread to obtain a registration relationship table;

[0012] The target hash table is determined according to the registration relationship table.

[0013] Preferably, the step of performing several bucket chain traversals according to the target hash table includes:

[0014] The target hash table is subjected to bucket chain splitting processing to obtain a plurality of bucket chains;

[0015] Each corresponding bucket chain is traversed using the bucket chain IDs of all the bucket chains to obtain the RCU memory state.

[0016] Preferably, the step of traversing each corresponding bucket chain using the bucket chain IDs of all the bucket chains comprises:

[0017] Traversing the nth bucket chain using the bucket chain ID corresponding to the bucket chain to obtain the task process of the main thread task in the main task thread;

[0018] Update the RCU memory usage corresponding to the main task thread according to the task process;

[0019] After the RCU memory usage of the a main task threads is updated, the RCU memory state is obtained according to the RCU update status of the a main task threads.

[0020] Preferably, the step of updating the RCU memory usage corresponding to the main task thread according to the task process further includes:

[0021] In the process of updating the RCU memory usage of the main task thread, context information in the same main task thread is obtained; the context information is used to characterize the task process of the updated main thread task.

[0022] Preferably, the multi-core device RCU memory release system further includes an iterative thread; and the step of performing several bucket chain traversals according to the target hash table further includes:

[0023] All the main task threads are iterated by using the iterative thread, and after completing the traversal of a preset number of the main task threads or the traversal of a preset period, the RCU memory state is output; the preset period is the time length for at least one traversal of all the main task threads.

[0024] Preferably, the step of releasing the RCU memory of the main task thread according to the RCU memory state includes:

[0025] Sending the RCU memory state to the RCU task thread through the iteration thread;

[0026] In the RCU task thread, the RCU memory of the main task thread is released according to the RCU memory state.

[0027] Preferably, the a main task threads are all or part of the threads of all the main task threads.

[0028] In a second aspect, the present application further provides a multi-core device RCU memory release system, the system comprising:

[0029] A plurality of main task threads, each of which is used to process a plurality of different main thread tasks;

[0030] An iteration thread, wherein the iteration thread is used to obtain a target hash table corresponding to all the main task threads, and perform a bucket chain traversal according to the target hash table to obtain an RCU memory state;

[0031] An RCU task thread, wherein the RCU task thread is used to release the RCU memory of all the main task threads according to the RCU memory state;

[0032] All the main task threads and the iteration threads are registered with the RCU task thread.

[0033] In a third aspect, the present application further provides a readable storage medium, wherein the readable storage medium stores at least one executable instruction, so that the multi-core device RCU memory release system executes any one of the multi-core device RCU memory release methods described above.

[0034] It can be seen from the above content that the present application provides a multi-core device RCU memory release method, system and readable storage medium, the method is applied to a multi-core device RCU memory release system, the multi-core device RCU memory release system includes several main task threads, each main task thread is used to process several different main thread tasks, the method includes: obtaining a target hash table corresponding to all the main task threads; performing several bucket chain traversals according to the target hash table to obtain the RCU memory status; the RCU memory status corresponds to the RCU memory usage of each of the main thread tasks in the several main task threads; and releasing the RCU memory of the main task thread according to the RCU memory status. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0036] Figure 1 Schematic diagram of the existing multi-core device RCU memory release system

[0037] Figure 2 A flowchart of a multi-core device RCU memory release method for this application;

[0038] Figure 3 A flowchart of obtaining a target hash table in a multi-core device RCU memory release method for this application;

[0039] Figure 4 A flowchart of obtaining the RCU memory status in a multi-core device RCU memory release method of this application;

[0040] Figure 5 This is a flowchart of bucket chain traversal in a multi-core device RCU memory release method for this application;

[0041] Figure 6 A schematic diagram of a multi-core device RCU memory release system for this application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] The RCU (Read-Copy Update) mechanism plays a vital role in network devices, especially high-performance firewalls. Its core function is to optimize the memory read operation performance between threads, while ensuring the security and data consistency of the system during write operations. In the architecture design of firewall devices, each CPU core will independently run a dp (data processing) task, which is responsible for handling a series of core tasks including parsing and applying configuration information, forwarding decisions of network packets, and statistics on device operation status.

[0044] Figure 1 A schematic diagram of an existing multi-core device RCU memory release system.

[0045] See also Figure 5It can be seen that in order to efficiently manage memory resources, the system will additionally start an RCU task, which is responsible for monitoring and coordinating the memory release process. Specifically, when the dp thread is started, it needs to register the memory block used by the current thread with the RCU and mark it as RCU memory. As the dp task is executed, each time a task cycle ends, it will update its status information to the RCU. The RCU periodically checks the status of all dp threads. Only when it is confirmed that all dp threads no longer need to use a block of memory to be released, will it perform the actual memory release operation, remove the memory from the to-be-released chain and return it to the system memory pool for subsequent tasks to reallocate and use.

[0046] However, in actual applications, when the DP thread takes too long to execute due to processing complex tasks (such as when there are a large number of concurrent sessions in the system, it needs to traverse all sessions to count running information), the memory blocks on the memory chain to be released cannot be released in time. Especially in scenarios where the firewall system has tight memory resources, this delayed release phenomenon will increase the pressure of memory allocation, and message forwarding failures due to insufficient memory will frequently occur, which will seriously affect the performance and stability of the firewall. Therefore, how to optimize the RCU mechanism and reduce memory release delays has become a key technical challenge to improve the overall performance of firewall devices.

[0047] Based on the above problems, the present application provides the following embodiments.

[0048] Figure 2 The present invention provides a flowchart of a method for releasing RCU memory of a multi-core device.

[0049] Figure 6 A schematic diagram of a multi-core device RCU memory release system for this application.

[0050] See also Figure 1 and Figure 6 It can be seen that this embodiment provides a multi-core device RCU memory release method, wherein the method is applied to Figure 6 A multi-core device RCU memory release system is disclosed, wherein the multi-core device RCU memory release system includes several main task threads, each main task thread is used to process several different main thread tasks.

[0051] The method comprises:

[0052] S100, obtaining a target hash table corresponding to all the main task threads. Specifically, in this embodiment, the conventional RCU memory traversal data basis is changed by using the target hash table corresponding to each of the main task threads.

[0053] Among them, Hash Table and Dynamic Programming (DP) (main task thread) threads are two crucial technologies in data processing and algorithm design. They each have unique characteristics and application scenarios, but in some cases, the two can be combined to improve the efficiency and performance of the program.

[0054] A hash table is a data structure that uses a hash function to map keywords to locations in the table, thereby enabling fast data lookup, insertion, and deletion operations. The core advantage of a hash table is that its average time complexity is close to O(1), which gives it a significant performance advantage when processing large-scale data sets. However, hash tables also face challenges such as hash conflicts and load factor management, requiring sophisticated hash function design and dynamic adjustment strategies to ensure stable performance.

[0055] Dynamic programming threads mainly involve the implementation of dynamic programming algorithms in a multi-threaded environment. Dynamic programming is a strategy for solving optimization problems. It greatly improves the efficiency of the algorithm by decomposing the original problem into relatively simple sub-problems and storing the solutions to the sub-problems to avoid repeated calculations. In a multi-threaded environment, the dynamic programming algorithm can further accelerate the solution process by processing sub-problems in parallel. However, multi-threaded programming also brings synchronization problems such as data competition and deadlock, and appropriate synchronization mechanisms need to be adopted to ensure correct collaboration between threads.

[0056] The relationship between the hash table and the dp thread is mainly reflected in the following aspects:

[0057] Data storage and access: In dynamic programming algorithms, it is usually necessary to store a large number of intermediate results and solutions to sub-problems. Hash tables can be used as an efficient data storage structure to store these intermediate results. Through hash tables, solutions to sub-problems can be quickly accessed and updated, thereby accelerating the execution of dynamic programming algorithms.

[0058] Parallelization acceleration: In a multi-threaded dynamic programming algorithm, a task can be decomposed into multiple subtasks, each of which independently solves a part of the subproblem. Hash tables can be used to record the execution status and results of subtasks, thereby achieving data sharing and synchronization between tasks. In addition, hash tables can also be used to quickly detect repeated subproblems to avoid unnecessary calculations.

[0059] Hash collision and thread safety: When hash tables are combined with multi-threaded environments, special attention should be paid to hash collision and thread safety issues. In order to avoid hash collisions, a good hash function and conflict resolution strategy need to be designed. At the same time, in order to ensure thread safety, appropriate synchronization mechanisms such as locks and semaphores need to be adopted to ensure that concurrent access to the hash table is correct and efficient.

[0060] Figure 3 This application provides a flowchart for obtaining a target hash table in a multi-core device RCU memory release method.

[0061] See also Figure 6 It can be seen that, further, in some embodiments, the multi-core device RCU memory release system also includes an RCU task thread, see Figure 2 It can be seen that the step of obtaining the target hash table corresponding to multiple main task threads includes:

[0062] S110, registering all the main task threads with the RCU task thread to obtain a registration relationship table;

[0063] S120: Determine the target hash table according to the registration relationship table.

[0064] Specifically, in this embodiment, before obtaining the target hash table of the main task thread, the main task thread needs to be registered with the RCU task thread, so that the target hash table of the main task thread can be obtained.

[0065] After the main task thread is registered with the RCU task thread, the registration relationship table corresponding to each main task thread can be obtained, and the target hash table can be determined according to the registration relationship table.

[0066] Among them, the registration relationship between the main task thread and the RCU (Read-Copy Update) task thread is a crucial link. The design and optimization of this relationship directly affects the performance, scalability and thread safety of the program.

[0067] The RCU task thread is a task execution thread based on the RCU lock mechanism. The RCU lock is an optimization and enhancement for the read-write lock, and its core concept is to trade space for time. Under the RCU lock mechanism, the reader thread can access the shared data structure without locks, and when the writer thread modifies the data, it will first copy a copy for modification, and then update the original data through the callback mechanism at the appropriate time. This mechanism greatly reduces the waiting time of the reader thread and improves the efficiency of the read operation.

[0068] In parallel programming, the registration relationship between the main task thread and the RCU task thread is implemented through a thread manager. The thread manager is responsible for maintaining a thread pool, which contains multiple main task threads and RCU task threads. When a new data processing task arrives, the thread manager will allocate one or more dp threads from the thread pool to execute the task according to the type and priority of the task.

[0069] At the same time, if the task involves reading and writing operations on shared data structures, the thread manager will further consider using RCU task threads. In this case, the thread manager will first check whether there is an available RCU task thread. If so, it will associate the RCU task thread with the main task thread and register it with the RCU lock mechanism. In this way, when the main task thread needs to read shared data, it can directly access it lock-free through the reader mode of the RCU lock; and when the main task thread needs to modify shared data, the writer mode of the RCU lock will be triggered, and the RCU task thread will be responsible for copying, modifying and updating the data.

[0070] Among them, in order to ensure that the registration relationship between the main task thread and the RCU task thread is efficient and stable, we need to perform a series of optimizations on the thread manager. First, we need to design an efficient thread scheduling algorithm to ensure that the main task thread and the RCU task thread can be reasonably allocated and scheduled. Secondly, we need to fine-tune the RCU lock mechanism to reduce the waiting time of the reader thread and the copy overhead of the writer thread. In addition, we also need to consider the communication and synchronization issues between threads to ensure the consistency and integrity of the data.

[0071] The method further comprises:

[0072] S200, performing several bucket chain traversals according to the target hash table. Specifically, in the present embodiment, in conventional RCU memory traversal, the RCU task thread is used to traverse all the main task threads, and thereby obtain the RCU memory usage of each of the main thread tasks in the main task thread. In the present embodiment, the several bucket chains into which the target hash table is split are traversed, and thereby the RCU memory status of each of the main task threads is obtained; wherein the RCU memory status corresponds to the RCU memory usage of each of the main thread tasks in the several main task threads.

[0073] Based on step S200, the RCU memory usage of each main thread task of each main task thread can be obtained, and direct traversal of all the main task threads can be avoided, thereby avoiding the problem of being unable to release the RCU memory of the main task thread due to too long execution time in one of the main task threads.

[0074] Among them, bucket chain (also known as linked list method to resolve conflicts) and hash table are two closely related data structures commonly used for data retrieval. The relationship between them is mainly reflected in the strategy of hash table to handle conflicts.

[0075] Since the output range of the hash function is limited, and the key set may be infinite, different keys may be mapped to the same position in the hash table. This phenomenon is called hash collision. The existence of a collision will destroy the performance of the hash table, causing the originally expected O(1) time complexity to degenerate to O(n), where n is the length of the conflict list.

[0076] In order to deal with hash conflicts, researchers have proposed a variety of solutions, among which bucket chain (also known as zipper method) is a common and effective method. In the bucket chain strategy, each position of the hash table (called a bucket) no longer stores only a single element, but a linked list (or other dynamic data structure). When a conflict occurs, the new element will be added to the linked list of the corresponding bucket instead of overwriting the original element.

[0077] In a hash table combined with a bucket chain, the hash function is still responsible for mapping a key to a bucket in the table. However, the bucket is no longer a single storage unit, but a linked list that can hold multiple elements. When you need to insert, delete, or find an element, the hash table first finds the corresponding bucket through the hash function, and then performs the corresponding operation in the linked list in the bucket.

[0078] The advantage of the bucket chain strategy is its flexibility and scalability. Since the linked list can grow dynamically, the hash table can accommodate any number of elements without being restricted by a fixed size. In addition, the insertion and deletion operations of the linked list are relatively simple, requiring only the adjustment of pointers without moving large amounts of data.

[0079] However, the bucket chain strategy also has some limitations. When the conflict is serious, the linked list in the bucket will become very long, resulting in reduced search efficiency. In addition, the memory overhead of the linked list is relatively high because each node requires an additional pointer to maintain the structure of the linked list. In order to optimize the bucket chain strategy, existing technologies include using more efficient hash functions to reduce the occurrence of conflicts; increasing the size of the hash table to disperse the elements; and using other data structures (such as red-black trees, balanced binary trees, etc.) to replace the linked list to improve search efficiency.

[0080] Figure 4 This application discloses a flowchart of obtaining RCU memory status in a multi-core device RCU memory release method.

[0081] See also Figure 3 It can be seen that, further, in some embodiments, the step of performing several bucket chain traversals according to the target hash table includes:

[0082] S210, performing bucket chain splitting processing on the target hash table to obtain a plurality of bucket chains;

[0083] S220: traverse each corresponding bucket chain using the bucket chain IDs of all the bucket chains to obtain the RCU memory state.

[0084] Specifically, in this embodiment, before traversal, the target hash table needs to be split into a plurality of bucket chains, and the bucket chains are traversed according to each bucket chain ID, so as to obtain the RCU memory state.

[0085] Figure 5 This application provides a flowchart of bucket chain traversal in a multi-core device RCU memory release method.

[0086] See also Figure 4 It can be seen that, further, in some embodiments, the step of traversing each corresponding bucket chain using the bucket chain IDs of all the bucket chains includes:

[0087] S221, traversing the nth bucket chain using the bucket chain ID corresponding to the bucket chain, and obtaining the task process corresponding to the main thread task in the main task thread;

[0088] S222, updating the RCU memory usage corresponding to the main task thread according to the task process;

[0089] S223, after completing the update of the RCU memory usage of the a main task threads, obtain the RCU memory status according to the RCU update status of the a main task threads.

[0090] Specifically, in this embodiment, the traversal of the entire hash table is split into the traversal of buckets, and one bucket chain is traversed at a time. Before traversing the next bucket chain, the RCU memory status of the main task thread is updated, and at the same time, while updating the RCU memory usage of the main task thread, the context information in the same main task thread is obtained; to avoid exceptions caused by the memory used after the RCU memory of the main task thread is updated having been released; the context information is used to characterize the task process of the updated main thread task.

[0091] By splitting the hash table traversal into bucket chain traversals, the RCU memory status can be updated in a timely manner. The RCU task thread can process the memory on the chain to be released in a timely manner.

[0092] Exemplarily, when traversing the target hash table, an RCU memory update is performed every time 100 bucket chains are traversed.

[0093] Among them, see Figure 6It can be seen that the multi-core device RCU memory release system also includes an iterative thread; the step of performing several bucket chain traversals according to the target hash table also includes using the iterative thread to iteratively traverse all the main task threads, and after completing the traversal of a preset number of the main task threads or the traversal of a preset period, outputting the RCU memory status; the preset period is the time length for traversing all the main task threads at least once.

[0094] It can be understood that the traversal through the bucket chain can be a traversal of a certain number of bucket chains, or it can be a periodic traversal. The periodic traversal is a several-fold traversal of all bucket chains.

[0095] Among them, there are Figure 6 It can be seen from the iterative thread in that the target hash table traversal (or bucket chain traversal) in this embodiment is completed by the iterative thread.

[0096] The method further comprises:

[0097] S300, releasing the RCU memory of the main task thread according to the RCU memory state. Specifically, in this embodiment, the RCU memory state is sent to the RCU task thread through the iteration thread, and the RCU memory of the main task thread is released in the RCU task thread according to the RCU memory state.

[0098] See also Figure 6 It can be seen that this embodiment also provides a multi-core device RCU memory release system, and the method of performing the above steps S100 to S300 is performed by the system, and the system includes:

[0099] A plurality of main task threads, each of which is used to process a plurality of different main thread tasks;

[0100] An iteration thread, wherein the iteration thread is used to obtain a target hash table corresponding to all the main task threads, and perform a bucket chain traversal according to the target hash table to obtain an RCU memory state;

[0101] An RCU task thread, wherein the RCU task thread is used to release the RCU memory of all the main task threads according to the RCU memory state;

[0102] All the main task threads and the iteration threads are registered with the RCU task thread.

[0103] Specifically, in this embodiment, the steps of releasing the RCU memory are:

[0104] The main task thread runs normally, and before that, the main task thread and the iteration thread are registered with the RCU task thread. After the registration is completed, the target hash table corresponding to all the main task threads is obtained through the iteration thread, and the bucket chain is traversed through the iteration thread, and the RCU memory usage corresponding to all the main task threads is obtained with the minimum "traversal area", and the RCU task thread releases the RCU memory of the main task thread and / or main thread task that meets the memory release requirements.

[0105] Further, in some embodiments, when the executable instruction is executed in the multi-core device RCU memory release system, the multi-core device RCU memory release system executes the multi-core device RCU memory release method in the above steps S100 to S300.

[0106] The advantages of this embodiment include:

[0107] By adding a drop point thread, the session traversal task is executed separately to avoid the impact of updating the RCU state on the memory usage of subsequent tasks during the session traversal process.

[0108] By treating a traversal of the hash bucket as a task and updating the RCU state after the task is completed, the purpose of timely memory release can be achieved.

[0109] Each time a task starts, the relevant memory information of the current hash bucket is re-obtained to avoid the pointer information being invalid after the RCU is updated.

[0110] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0111] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.

Claims

1. A multi-core device RCU memory release method, characterized in that: The method is applied to a multi-core device RCU memory release system, the multi-core device RCU memory release system includes a plurality of main task threads, each main task thread is used to process a plurality of different main thread tasks, the method includes: Obtain a target hash table corresponding to all the main task threads; Perform several bucket chain traversals according to the target hash table to obtain an RCU memory state; the RCU memory state corresponds to the RCU memory usage of each of the main thread tasks in the several main task threads; The RCU memory of the main task thread is released according to the RCU memory state.

2. A multi-core device RCU memory release method according to claim 1, characterized in that: The multi-core device RCU memory release system also includes an RCU task thread, and the step of obtaining a target hash table corresponding to a plurality of main task threads includes: Register all the main task threads with the RCU task thread to obtain a registration relationship table; The target hash table is determined according to the registration relationship table.

3. A multi-core device RCU memory release method according to claim 2, characterized in that: The step of performing several bucket chain traversals according to the target hash table includes: The target hash table is subjected to bucket chain splitting processing to obtain a plurality of bucket chains; Each corresponding bucket chain is traversed using the bucket chain IDs of all the bucket chains to obtain the RCU memory state.

4. A multi-core device RCU memory release method according to claim 3, characterized in that: The step of traversing each corresponding bucket chain using the bucket chain IDs of all the bucket chains comprises: Traversing the nth bucket chain using the bucket chain ID corresponding to the bucket chain to obtain the task process of the main thread task in the main task thread; Update the RCU memory usage corresponding to the main task thread according to the task process; After the RCU memory usage of the a main task threads is updated, the RCU memory state is obtained according to the RCU update status of the a main task threads.

5. A multi-core device RCU memory release method according to claim 4, characterized in that: The step of updating the RCU memory usage corresponding to the main task thread according to the task process also includes: In the process of updating the RCU memory usage of the main task thread, context information in the same main task thread is obtained; the context information is used to characterize the task process of the updated main thread task.

6. A multi-core device RCU memory release method according to claim 2, characterized in that: The multi-core device RCU memory release system also includes an iterative thread; the step of performing several bucket chain traversals according to the target hash table also includes: All the main task threads are iterated by using the iterative thread, and after completing the traversal of a preset number of the main task threads or the traversal of a preset period, the RCU memory state is output; the preset period is the time length for at least one traversal of all the main task threads.

7. A multi-core device RCU memory release method according to claim 6, characterized in that: The step of releasing the RCU memory of the main task thread according to the RCU memory state comprises: Sending the RCU memory state to the RCU task thread through the iteration thread; In the RCU task thread, the RCU memory of the main task thread is released according to the RCU memory state.

8. A multi-core device RCU memory release method according to claim 4, characterized in that: The a main task threads are all or part of the threads of all the main task threads.

9. A multi-core device RCU memory release system, the system being used to execute the multi-core device RCU memory release method according to any one of claims 1 to 8, the system comprising: A plurality of main task threads, each of which is used to process a plurality of different main thread tasks; An iteration thread, wherein the iteration thread is used to obtain a target hash table corresponding to all the main task threads, and perform a bucket chain traversal according to the target hash table to obtain an RCU memory state; An RCU task thread, wherein the RCU task thread is used to release the RCU memory of all the main task threads according to the RCU memory state; All the main task threads and the iteration threads are registered with the RCU task thread.

10. A readable storage medium storing at least one executable instruction, wherein when the executable instruction is executed in a multi-core device RCU memory release system, the multi-core device RCU memory release system executes the multi-core device RCU memory release method according to any one of claims 1 to 8.